Do the Todo using the variables given please This program converts an inputted number between 0 and 3,999,               inclusive, into its Roman numeral equivalent.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Do the Todo using the variables given please

This program converts an inputted number between 0 and 3,999,
              inclusive, into its Roman numeral equivalent.

: Inputs:
: Out put:
number - The user inputted number between 0 and <4000.
roman _numeral
The string representing the number in
Roman numerals.
thousands digit
hundreds_digit
tens digit - The tens digit that is being processed.
ones_digit
remaining digits
:Misc. Vars:
The thousands digit that is being processed.
The hundreds digit that is being processed.
The ones digit that is being processed.
The remaining digits that are yet to be
processed.
ones list = ['',
tens list = ['', 'X', 'XX'
' IX']
' XC']
I',
' IV', 'V', 'VI',
' XL',
'II', 'III',
'VII',
'VIII',
' XXX'
'L', 'LX', 'LXX',
'LXXX',
hundreds list = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC',
"DCCC',
CM']
thousands list = ['', 'M', 'MM',
' MMM']
# GOOD STYLE: Display to the user the purpose of the program
# INPUT SECTION
print (' This program converts a positive integer up to 3,999 into the')
print ('Roman number system. Enter a positive integer:', end=' ')
number
= int (input () )
# PROCESSING SECTION
if # condition to check if the number is valid:
roman numeral =I
# TODO: Complete the processing of the 4 digit number
# Get the thousands digit
# Get the remaining digits
# Get the hundreds digit
# Get the remaining digits
# Get the tens digit
# Get the ones digit
# Use string concatenation to find the Roman numeral for the parsed digits
roman numeral =
# OUTPUT SECTION
print ()
print ('{number} written in roman numerals is (roman numeral}.')
else:
print ()
print ('Invalid input !! Input must be a positive integer less than 4,000.')
Transcribed Image Text:: Inputs: : Out put: number - The user inputted number between 0 and <4000. roman _numeral The string representing the number in Roman numerals. thousands digit hundreds_digit tens digit - The tens digit that is being processed. ones_digit remaining digits :Misc. Vars: The thousands digit that is being processed. The hundreds digit that is being processed. The ones digit that is being processed. The remaining digits that are yet to be processed. ones list = ['', tens list = ['', 'X', 'XX' ' IX'] ' XC'] I', ' IV', 'V', 'VI', ' XL', 'II', 'III', 'VII', 'VIII', ' XXX' 'L', 'LX', 'LXX', 'LXXX', hundreds list = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', "DCCC', CM'] thousands list = ['', 'M', 'MM', ' MMM'] # GOOD STYLE: Display to the user the purpose of the program # INPUT SECTION print (' This program converts a positive integer up to 3,999 into the') print ('Roman number system. Enter a positive integer:', end=' ') number = int (input () ) # PROCESSING SECTION if # condition to check if the number is valid: roman numeral =I # TODO: Complete the processing of the 4 digit number # Get the thousands digit # Get the remaining digits # Get the hundreds digit # Get the remaining digits # Get the tens digit # Get the ones digit # Use string concatenation to find the Roman numeral for the parsed digits roman numeral = # OUTPUT SECTION print () print ('{number} written in roman numerals is (roman numeral}.') else: print () print ('Invalid input !! Input must be a positive integer less than 4,000.')
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY