This program converts an inputted number between 0 and 3,999, inclusive, into its Roman numeral equivalent. Please follow along and use the variables provided : Inputs: : Out put: number - The user...


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


Please follow along and use the variables provided


: Inputs:<br>: Out put:<br>number - The user inputted number between 0 and <4000.<br>roman _numeral<br>The string representing the number in<br>Roman numerals.<br>thousands digit<br>hundreds_digit<br>tens digit - The tens digit that is being processed.<br>ones_digit<br>remaining digits<br>:Misc. Vars:<br>The thousands digit that is being processed.<br>The hundreds digit that is being processed.<br>The ones digit that is being processed.<br>The remaining digits that are yet to be<br>processed.<br>ones list = ['',<br>tens list = ['', 'X', 'XX'<br>' IX']<br>' XC']<br>I',<br>' IV', 'V', 'VI',<br>' XL',<br>'II', 'III',<br>'VII',<br>'VIII',<br>' XXX'<br>'L', 'LX', 'LXX',<br>'LXXX',<br>hundreds list = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC',<br>

Extracted 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.') 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="">
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here