1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
castortr0y [4]
3 years ago
8

Flowgorithm, Design a program that prompts the user to enter a number within the range of 1 through 10. The program should displ

ay the Roman numeral version of that number. If the number is outside the range of 1 through 10, the program should display an error message?

Computers and Technology
1 answer:
kherson [118]3 years ago
6 0

Answer:

Step by step code along with explanation and output is given below

Explanation:

We can solve this problem using if elif else approach

def main():

# prompts the user to enter an integer from 1 to 10

 num = int (input('Enter a number in the range of 1 to 10:\n'))

# using the if elif print out the roman numeral from 1 to 10

 if num == 1:

   print ('Roman Numeral for 1 is I')

 elif num == 2:

   print ('Roman Numeral for 2 is II')

 elif num == 3:

   print ('Roman Numeral for 3 is III')

 elif num == 4:

   print ('Roman Numeral for 4 is IV')

 elif num == 5:

   print ('Roman Numeral for 5 is V')

 elif num == 6:

   print ('Roman Numeral for 6 is VI')

 elif num == 7:

   print ('Roman Numeral for 7 is VII')

 elif num == 8:

   print ('Roman Numeral for 8 is VIII')

 elif num == 9:

   print ('Roman Numeral for 9 is IX')

 elif num == 10:

   print ('Roman Numeral for 10 is X')

# using the else print out error message whenever user enters any other number not listed above

 else:

   print ('Error! Wrong Input')

# call the main function

main()

Output:

Enter a number in the range of 1 to 10:

6

Roman Numeral for 6 is VI

Enter a number in the range of 1 to 10:

15

Error! Wrong Input

You might be interested in
What does the Flippy Do Pro show about representing very small numbers?
chubhunter [2.5K]

Answer:

it shows number that is near the target figure, but not the actual figure

Explanation:

What Flippy Do Pro reveal about representing a very small number is a number that is near the expected number in value. This is because Flippy Do Pro would not reveal some particular lesser numbers in their precise value.

However, this often results in roundoff blunder, which is mostly caused by the inability of bit compositions to depict the outcome of numbers as it should precisely be.

4 0
3 years ago
Write a program that has the user input how many classes they are taking this semester and then output how many hours they will
NeTakaya

wait i don't understand: "Write a program that has the user input how many classes they are taking this semester and then output how many hours they will need to study each week."

8 0
3 years ago
Read 2 more answers
To enforce the concept of separating class definition from its function implementations, where should the function implementatio
zzz [600]
D(in a .c file ) because that is where it should be placed :)
4 0
2 years ago
A computer is made up of hardware and software ​
denis-greek [22]
Um well yeahhhhuhh lol
4 0
3 years ago
What type of windows network model allows all the participants to be represented equally on the network with no single computer
noname [10]
The workgroup as a type of windows network model allows all the participants to be represented equally on the network with no single computer having authority or control over another. The workgroup is peer-to-peer local area network. 
Members of this network group can share files, printers, Internet connection.<span> and other local network resources.</span>
4 0
3 years ago
Other questions:
  • "Which of the following will help protect against a brute force attack?
    11·1 answer
  • Create a simple main() that solves the subset sum problem for any vector of ints. Here is an example of the set-up and output. Y
    12·1 answer
  • Can i still download an update for an xbox one game if it's not turned on
    13·1 answer
  • What are three ways you cite evedince
    5·2 answers
  • How do media and networks interact? A. Networks and media work in exactly the same way. B. Media are connected to networks that
    8·1 answer
  • You wouldn't think a simple shop like Dippy Donuts would be an interesting target for hackers. But look beyond the donuts and yo
    7·1 answer
  • What is a spreadsheet program?<br> A spreadsheet program is a computerized version of _______
    5·1 answer
  • The use of desktop computer equipment and software to create high-quality documents such as newsletters, business cards, letterh
    14·1 answer
  • A source mainly provides <br> from a text or piece of media.
    6·2 answers
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!