number = input("Enter a number between 1 and 10. ") if(number==1): print("The number is I") elif(number==2): print("The number is II") elif(number==3): print("The number is III") elif(number==4): print("The number is IV") elif(number==5): print("The number is V") elif(number==6): print("The number is VI") elif(number==7): print("The number is VII") elif(number==8): print("The number is VIII") elif(number==9): print("The number is IX") elif(number==10): print("The number is X") if(number<1): print("Error - enter a number between 1 and 10.") if(number>10): print("Error - enter a number between 1 and 10.")
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