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
Transistors contain a huge number of integrated circuits <br><br> a. true or <br> b. false
malfutka [58]
False. Integrated circuits have transistors within them, not the other way around
6 0
3 years ago
3) You can't name your report.<br> True or false?
dexar [7]

Not sure if this is a legit question or not but no you probably shouldnt give your report a name lol

8 0
4 years ago
g create your own min function that finds the minimum element in a list and use it in a separate function
skelet666 [1.2K]

Answer:

Following are the code to this question:

def min_function(x):#defining a method min_function

   mini= x[0]#defining a variable to hold list value

   for i in x[1:]:#defining for loop to count values

       if i < mini: #defining if block to check minimum value

           mini = i #holding minimum value in mini variable

   return (mini)#return value

print(min_function([9,8,7,6,5,4,3,2,1,11,19]))#use print method to call min_function

Output:

1

Explanation:

In the above code, a method min_function is defined, that holds a list as the parameter and inside the method, a mini variable is defined, that holds a list value and use a for loop to define a condition to check the minimum value in the list and store its value in a mini variable and use a return keyword to return its value.

At the last print, the method is used to call the above method with accepting list values.

7 0
3 years ago
What are listed in the vertical columns across the top of the Event Editor?
yan [13]

A , file names  is the awnser

5 0
3 years ago
Read 2 more answers
Convert octal number 2470 to decimal number
Vikki [24]
In decimal it is:
0*8^0 + 7*8^1 + 4*8^2 + 2*8^3 = 1336

Basically adding up the place values.
3 0
4 years ago
Read 2 more answers
Other questions:
  • When you open a spreadsheet file, the contents of the file are copied into the
    5·1 answer
  • âwhen the footer is the last element in a page body, the _____ pseudo-element is used to add a placeholder element after the foo
    8·2 answers
  • To analyze data from a survey, you use a spreadsheet to calculate the percent of students who prefer corn over broccoli or carro
    11·2 answers
  • A palindrome is any word, phrase, or sentence that reads the same forward and backward. Here are some well-known palindromes: Ab
    11·1 answer
  • You want to establish the validity of a test designed for computer technicians using a predictive criterion-related validation s
    9·1 answer
  • Whats the highest rank in brainly
    14·2 answers
  • Va rog ajutatima !!!!!!! aicea trebue cu cangorou de facut si cu cit
    13·1 answer
  • Definition of Computer forensics?
    12·2 answers
  • After months of hard work, the big day has finally arrived, and your software will be produced and distributed. Which phase of t
    15·1 answer
  • Mechanisms that can be used to rescue accident victims
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!