print("Hello, I am the almighty beign which assigns you grade. Be nice to me and you wont get an error.") mark=int(input("What is your mark")) if mark>=81: grade="A" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Aim for an A*") elif mark<81 and mark>=75: grade="B" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Average performance, buit not good enough for an A") elif mark<75 and mark>=69: grade="C" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Poor ...") elif mark<69 and mark>=63: grade="D" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Very Bad. I expect much more from you") elif mark<63 and mark>=58: grade="E" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Absolute rubbish. How can you get so bad? That is appauling") elif mark<58: grade="U" print("Your mark: ", mark, ". Your grade: ", grade, ". Comment: Get out of my sight.")
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