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]
2 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]2 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
Enter the cube's edge: 4<br> The surface area is 96 square units.<br> Python
mr_godi [17]

Answer:

See the program code below.

Explanation:

def cube_SA(edge):

 edge = int(input("Enter the cube's edge: "))

 sa = edge * edge * 6

 print("The surface area is {} square units".format(sa))

cube_SA(4)

Best Regards!

5 0
2 years ago
"You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all t
Stella [2.4K]

Answer:

apt-get

Explanation:

apt-get can be used to manually install a package, without need to manually install all the dependencies for the package.

7 0
3 years ago
What is the name of html command? ​
Makovka662 [10]

Here are some.

  • <html></html> This is the root element tag. ...
  • <head></head> ...
  • <title></title> ...
  • <body></body> ...
  • <h1></h1> ...
  • <p></p> ...
  • <a></a> ...
  • <img></img>
<h2>hope it helps.</h2><h2>stay safe healthy and happy....</h2>
3 0
2 years ago
Choosing the “Quick Print” button will ____________.
harkovskaia [24]
Choosing the "Quick Print" button will print to the default print (Answer is B). The quick print function is accessible in the Quick Access Tool bar . By clicking the drop down arrow of the quick access tool bar it will let you choose different types of default access including your Quick print.
7 0
3 years ago
IN PYTHON LANGUAGE
shtirl [24]

favorite_color = input("Enter favorite color:\n")

pet = input("Enter pet's name:\n")

num = input("Enter a number:\n")

print("You entered: "+favorite_color+" "+pet+" "+num)

password1 = favorite_color+"_"+pet

password2 = num+favorite_color+num

print("First password: "+password1)

print("Second password: "+password2)

print("Number of characters in "+password1+": "+str(len(password1)))

print("Number of characters in "+password2+": "+str(len(password2)))

This works for me.

8 0
2 years ago
Read 2 more answers
Other questions:
  • Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with a
    13·1 answer
  • Write the interface (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of
    13·1 answer
  • What is ambiguous grammar, explain in maximum 50words.
    5·1 answer
  • which of the following statements about servers is correct A. servers are computers on a network that share their resources with
    12·2 answers
  • What stores all software and files on your computer and reads and writes data onto a spinning magnetic or optical disk?
    6·1 answer
  • This is a quick and easy program that will let you practice the basics of the switch statement. You will ask the user to enter a
    6·1 answer
  • The stub: transmits the message to the server where the server side stub receives the message and invokes procedure on the serve
    8·1 answer
  • Need help with a program to search to sort elements in an array.(increasing or decreasing order)
    8·1 answer
  • Type of cable installed on a patch panel?
    15·1 answer
  • Language modeling incorporates rules of __. Select all that apply.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!