Create a function that calculates the college general weighted average (GWA) for three school subjects. The inputs 11 be the grades for each of the subjects. The first subject has 5 units, the second has 3 units, and the third has 1 unit. sume that there will always be college numerical grades inputted for the first two subjects. The third subject should an input with a default value of 1.00. Input Format The inputs will be 2 comma separated numbers. Constraints Assume that only valid numeric grades will be given. Use these two lines: inl, in2 = input (). Split (“,") inl in2 = float (inl) float (in2)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 7E
icon
Related questions
Question

Using Python3, encode the following:

Constraints: 15 lines only excluding comments and white space. 

1. Create a function that calculates the college general weighted average (GWA) for three school subjects. The inputs
will be the grades for each of the subjects. The first subject has 5 units, the second has 3 units, and the third has 1 unit.
Assume that there will always be college numerical grades inputted for the first two subjects. The third subject should
be an input with a default value of 1.00.
Input Format
The inputs will be 2 comma separated numbers.
Constraints
Assume that only valid numeric grades will be given.
Use these two lines:
inl, in2 = input 0. Split (“,")
inl, in2 = float (inl), float (in2)
Output Format
Print the computed GWA using the specified format. Remember to round to two decimal places using
round (, 2).
Sample:
Input:
1.0, 1.0
Output:
The student's GWA is 1.0
Transcribed Image Text:1. Create a function that calculates the college general weighted average (GWA) for three school subjects. The inputs will be the grades for each of the subjects. The first subject has 5 units, the second has 3 units, and the third has 1 unit. Assume that there will always be college numerical grades inputted for the first two subjects. The third subject should be an input with a default value of 1.00. Input Format The inputs will be 2 comma separated numbers. Constraints Assume that only valid numeric grades will be given. Use these two lines: inl, in2 = input 0. Split (“,") inl, in2 = float (inl), float (in2) Output Format Print the computed GWA using the specified format. Remember to round to two decimal places using round (, 2). Sample: Input: 1.0, 1.0 Output: The student's GWA is 1.0
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning