def exams(): three = eval(input("3rd nine weeks grade - ")) four = eval(input("4th nine weeks grade - ")) A = -((three*0.4)+(four*0.4)-89.5)/0.2 B = -((three*0.4)+(four*0.4)-79.5)/0.2 C = -((three*0.4)+(four*0.4)-69.5)/0.2 D = -((three*0.4)+(four*0.4)-63.5)/0.2 print("") print("For an A, your exam needs to be a - ", A) print("For a B, your exam needs to be a - ", B) print("For a C, your exam needs to be a - ", C) print("For a D your exam needs to be a - ", D) print("") x = eval(input("Wanna know your semester grade? (yes = 1 ; no = 2) ")) if x == 1: print("") exam = eval(input("What do you think you'll get on your exam? ")) sem = (three*0.4)+(four*0.4)+(exam*0.2) print("") print("If you score a/an", exam, "on your exam, your semester grade will be... ", sem,"%") else: print("") print("fuck you.") print("") exams()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question