Reputation: 11
Ideal= int(input("What grade do you want on your next assignment?"))
Current= int(input("What is your current grade in the class?"))
weight = int (input("What is the weight of the assignment (how much of your grade is it worth)?"))
print Ideal
print Current
print weight
Final_grade = Ideal − (( 1 − weight ) * Current)* weight
print "You will need to get a" , Final_grade , "on your next assignment to recieve a" , Current , "in this class"
Upvotes: 0
Views: 3272
Reputation: 1306
The error is because your −
character is not actually minus character. You might have copied this piece of code from somewhere which didn't actually have the minus character.
This is the correct minus character : -
Try this:
Ideal= int(input("What grade do you want on your next assignment?"))
Current= int(input("What is your current grade in the class?"))
weight = int (input("What is the weight of the assignment (how much of your grade is it worth)?"))
print Ideal
print Current
print weight
Final_grade = Ideal - (( 1 - weight ) * Current)* weight
print "You will need to get a" , Final_grade , "on your next assignment to recieve a" , Current , "in this class"
Output:
What grade do you want on your next assignment?5
What is your current grade in the class?4
What is the weight of the assignment (how much of your grade is it worth)?4
5
4
4
You will need to get a 53 on your next assignment to recieve a 4 in this class
Upvotes: 1