Apr-04-2019, 02:26 AM
Hey guys I keep getting this error:
Welcome to Course Average Tool.
Enter first number:
Traceback (most recent call last):
File "lab4d.py", line 37, in <module>
main()
File "lab4d.py", line 25, in main
grade_1 = int(input())
TypeError: input() missing 1 required positional argument: 'string'
This is my code:
Welcome to Course Average Tool.
Enter first number:
Traceback (most recent call last):
File "lab4d.py", line 37, in <module>
main()
File "lab4d.py", line 25, in main
grade_1 = int(input())
TypeError: input() missing 1 required positional argument: 'string'
This is my code:
def course_average(grade1, grade2, grade3): crse_avg = (grade1 + grade2 + grade3)/3 return crse_avg def main(): print('Welcome to Course Average Tool.') print('Enter first number: ') grade_1 = int(input()) print('Enter second number: ') grade_2 = int(input()) print('Enter third number: ') grade_3 = int(input()) course_average(grade_1, grade_2, grade_3) print('The average of',grade_1, ',', grade_2, 'and', grade_3, 'is', course_average(grade_1,grade_2,grade_3)) # comment out this call to main() before you evauate with the checkmark icon main()