Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DO NOT USE THE .APPEND COMMAND FOR THIS PROGRAM. Please program in Python 3 for the following questions. Create a program that does the following:

DO NOT USE THE .APPEND COMMAND FOR THIS PROGRAM.

image text in transcribed

Please program in Python 3 for the following questions. Create a program that does the following: Asks the user to enter a four-digit number Outputs the number as Roman numerals. Your code should all be in one file. To get the hang of Arabic-to-Roman numeral conversion, look at this online converter e. Do not worry about the second column of Roman numerals, i.e.. those with lines above them. Your program onhy s the numerals (1) M (1000) To submit: Copy/paste your code and the output from running it with all of these inputs: . 0000 . 2999 . 1973 . 1956 . 2018 . 2000 . 0400 . 0040 . 0004 DO NOT USE any features that we have not yet studied Hint-1: Use incremental development techniques for this program. For example, don't even think about the conversion problem until you have first managed to separate the four-digit string into four one-digit strings Hint-2: I started off solving the conversion problem by writing out a table of all the digits for each of the four positions within the four-digit string, along with the Roman equivalent of each one. For example, here is the table I created for just the second digit (the hundreds place): 0 1 C 2 CC 4 CD 5 D 6 DC 7 DCC 8 DCCC 9 CM Thus, whenever a 9 is the second digit, the Roman numeral equivalent will contain a CM to represent 900. I put the table above into my docstring for the function that processes the second digit. Hint-3: Look at this one only if you're seriously STUCK! Here's my code structure

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions