# ////////////////////// ALGORITHIM ///////////////////////// # 1 prompt the user for a number from range of 1-10 # 2 display roman numeral for that number # 3 if outside range of 1-10 display error message invalid number try reentering # ////////////////////// ALGORITHIM END ///////////////////////// # ////////////////////// PSEUDOCODE ///////////////////////// # IF <<number >= 0, 11 # Error the number you have entered is not in the range of 1-10 # Elif var = 1 # display I # Elif var = 2 # display II # Elif var = 2 # display II # Elif var = 3 # display III # Elif var = 4 # display IV # Elif var = 5 # display V # Elif var = 6 # display VI # Elif var = 7 # display VII # Elif var = 8 # display VIII # Elif var = 9 # display IX # Elif var = 10 # display X #END IF # MAIN MODULE number = 0 #getInput Module number = input("Please enter a number within the range of 1-10") print("Was your number " + number + "?") #decisionPiece Module if(number==1): print("The number is I") elif(number==2): print("The number is II") elif(number==3): print("The nubmer is III") else(number==3): print("The number is X") print ("Good bye!") #printNumber Module
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