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
Kevin gets a call from a user who is trying to install a new piece of software. The user doesn’t have administrative rights, so
lyudmila [28]

Answer:

use Remote Desktop

Explanation:

8 0
3 years ago
Overnight Delivery Service delivers a package to Pam. At the request of Overnight's delivery person, to acknowledge receipt Pam
SSSSS [86.1K]

Answer:

Option b (a digitized handwritten signature) would be the right option.

Explanation:

  • Another photograph of such a handwritten signature was used to digitally sign transcripts that would be perceived to have become a "digitized signature."
  • Those same kinds of signature verification may take a glance official, but they don't protect against widespread fraud, a vital component of every other internet signature.

The latter available options weren’t connected to the type of situation in question. So the response above would be the correct one.

3 0
2 years ago
In the program below, which two variables have the same scope?
bagirrra123 [75]

Answer:

rhymeWord

Explanation:

correct answer edge 2020

3 0
3 years ago
Read 2 more answers
In a computer-controlled greenhouse, a temperature sensor and a window motor are connected to the computer.
GrogVix [38]
Hope this helps solve it

8 0
2 years ago
Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than
Masteriza [31]

Answer:

See explaination

Explanation:

#Run the code in the python version 3.x.

#Define the function.

def shampoo_instructions(num_cycles):

#Check the cycles to be greater than 1.

if num_cycles < 1:

#Display the statement.

print('Too few.')

#Check the cycles to be greater than 4.

elif num_cycles > 4:

#Display the statement.

print('Too many.')

#The else part.

else:

#Initialize the variable.

N = 1;

#Begin the for loop.

for N in range(N, num_cycles+1):

#Print the result.

print(N , ": Lather and rinse.")

#Print the statement.

print('Done.')

#Call the function.

shampoo_instructions(2)

7 0
2 years ago
Other questions:
  • Jim has entered the age of each of his classmates in cells A1 through A65 of a spreadsheet. Which function should Jim use to fin
    11·2 answers
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • A book of the Law was found in the Temple, which was being repaired, during what year of Josiah's reign.
    15·2 answers
  • . A program that can run more than one thread at once is called:
    9·1 answer
  • An array name and index are separated using ____.
    13·1 answer
  • Complete a graphic organizer to explain the responsibilities of a borrower
    14·1 answer
  • A(n) __________ describes a set of well-defined logical steps that must be taken to perform a task
    5·1 answer
  • Which of these organs is not found in the excretory system
    7·2 answers
  • Why it is not recommended to add sound effect on slide transition? Write at least two reasons.​
    6·1 answer
  • Help me with thissssss
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!