Nov-29-2017, 06:44 PM
Okay so I'm working on this super basic program for my AP Comp Sci class, and I've only just recently started Python so I'm a little lost. I'm making a program in which a student can enter their current grade and then, depending on what grade they would like to end the class with, they are told what grade they need to make on their final exam. Here is my code as it stands:
---------------------------------------------------------------------
cGrade = int(input("What is your current grade in the class?"))
cGrade = cGrade * 4 #to fit the formula to find exam grade needed
A = 450 - int(cGrade)
B = 400 - int(cGrade)
C = 450 - int(cGrade)
D = 300 - int(cGrade)
fGrade = input("What letter grade would you like to end with?")
---------------------------------------------------------------------
(We're working exclusively in PythonRoom right now if that is important)
I want fGrade, the user input, to be entered as a letter grade. So for example if they want their final grade to be A, the program will say something like
if variable(user input = A):
print("In order to end with an A, you will need to score ") + A + (" on your final exam.")
I hope this was clear, as I said I'm super new so I'll take all the tips y'all have to offer.