NameError: name ‘average’ is not defined. I need help with this error. /u/wolfgheist Python Education

I am getting frustrated that I am learning this stuff and it works for the instructor and not for me. Here is what he has in his video and it works for him. For me I enter the three values and then get an error that average is not defined.

# Get three test scores and assign them to the # test1, test2, and test3 variables. test1 = float(input('Enter the first test score: ')) test2 = float(input('Enter the second test score: ')) test3 = float(input('Enter the third test score: ')) # Calculate the average of the three scores # and assign the results to the average variable. average - (test1 + test2 + test3) / 3.0 # Display the average. print('The average score is', average) 

submitted by /u/wolfgheist
[link] [comments]

​r/learnpython I am getting frustrated that I am learning this stuff and it works for the instructor and not for me. Here is what he has in his video and it works for him. For me I enter the three values and then get an error that average is not defined. # Get three test scores and assign them to the # test1, test2, and test3 variables. test1 = float(input(‘Enter the first test score: ‘)) test2 = float(input(‘Enter the second test score: ‘)) test3 = float(input(‘Enter the third test score: ‘)) # Calculate the average of the three scores # and assign the results to the average variable. average – (test1 + test2 + test3) / 3.0 # Display the average. print(‘The average score is’, average) submitted by /u/wolfgheist [link] [comments] 

I am getting frustrated that I am learning this stuff and it works for the instructor and not for me. Here is what he has in his video and it works for him. For me I enter the three values and then get an error that average is not defined.

# Get three test scores and assign them to the # test1, test2, and test3 variables. test1 = float(input('Enter the first test score: ')) test2 = float(input('Enter the second test score: ')) test3 = float(input('Enter the third test score: ')) # Calculate the average of the three scores # and assign the results to the average variable. average - (test1 + test2 + test3) / 3.0 # Display the average. print('The average score is', average) 

submitted by /u/wolfgheist
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *