Here is my program:
#avg2.py
# A simple program to average two exam scores
# Illustrates use of multiple input
def main():
print('This is a program to average two exam scores')
score1, score2 = float(input('Enter two scores separated by a comma: '))
average = (score1 + score2) / 2.0
print('The average of the scores is:', average)
main()
When I run the program and enter two values, e.g.:
This is a program to average two exam scores
Enter two scores separated by a comma: 2, 3
I get the following error:
line 8, in main
score1, score2 = float(input('Enter two scores separated by a comma: '))
ValueError: invalid literal for float(): 2, 3
How do I fix this? :?: