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 is “centrifugal bumble puppy”? why is it important for games to require a complicated apparatus?
kirill115 [55]

Centrifugal Bumble Puppy is a game in which a bunch of kids throw a ball on top of a steel tower, the ball rolls into the interior, and onto a rotating disk and is hurled through one or other of the numerous apertures, and is meant to be caught. The purpose of games these days is to require complicated apparatus; something that needs to be bought in order to increase consumption. In this case, machinery is needed for the game.

7 0
3 years ago
Read 2 more answers
Which of these sites would need additional investigation to check for reliability?
irga5000 [103]
Could you please give add some detail? I would assume any site ending in .com would need to be checked for reliability due to the fact anyone can have a .com, but a site such as edu is more trustworthy. 

5 0
3 years ago
Read 2 more answers
How does the speaker feel about traditional forms of poetry
Salsk061 [2.6K]
A speaker sometimes is not able to capture the intended details since it is affected by homophones.
7 0
3 years ago
Read 2 more answers
Which command executed in Windows PE would transfer both the files and directory structure from one device to another device or
EleoNora [17]

Answer:

xcopy

Explanation:

xcopy (which stands for extended copy) command, was created to have several functions and ability to copy one or more folders, files or an entire directory from one location to another. It is more powerful than copy command that was seen in the first set of operating systems. It is currently being built into desktop operating systems and Microsoft windows server.

6 0
3 years ago
Every computer consists of physical components and nonphysical components. the nonphysical components of a computer that underst
IrinaVladis [17]
Physical component means Computer Hardware which you can touch and non Physical component means Software, which you can not touch. nonphysical component designed specially for physically component. like Microsoft company designed Software according the Hardware for example Microsoft windows 64 bit could not install on which 32 bit Architecture Hardware.
7 0
3 years ago
Other questions:
  • When a crystal grows in unrestricted space, how does growth occur?
    14·2 answers
  • What so the term used to describe how many bits are used in each pixel?
    7·1 answer
  • 1. Zack sees an online contest. He could win $10,000 instantly! On the sign-up form, he enters his name and email address. He is
    15·1 answer
  • Write an expression to print each price in stock_prices. Sample output with inputs: 34.62 76.30 85.05
    9·1 answer
  • A _________ is automatically launched by some trigger and appears in front of the active window
    12·1 answer
  • A byte contains how many bits? Question 3 options:
    13·2 answers
  • What is an operating system? What are the main functions of a modern general purpose operating system?
    7·1 answer
  • MacBook Pro (2019) at 93% max capacity battery rating after 100 charge cycles. Is this normal? Used coconut battery to check thi
    10·2 answers
  • Sharon must give an informative presentation to a group of teenagers about cultivating earthworms for use in home gardening. Whi
    11·2 answers
  • What product use programmable control?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!