Question: Write a python function that, converts Roman numerals to values. Go only till 20 (Roman: XX). Input: Roman Numerals. Output: Decimal Equivalent. I: 1, V:5,

Write a python function that, converts Roman numerals to values. Go only till 20 (Roman: XX). Input: Roman Numerals. Output: Decimal Equivalent.

I: 1, V:5, X:10

Program ends when x is entered

Sample Output:

Please enter the Roman Numeral: XII

The Number is: 12

Please enter the Roman Numeral: XV

The Number is:: 15

Please enter the Roman Numeral: III

The Number is:: 3

Please enter the Roman Numeral: x

Good Bye !

my idea

def roman_count(sting)

count

How to count I=1, V=5, X=10?

for I in string:

if I in x

count += 1

for V in x

count += 5?

use a loop while to ask for input and run function

while true :

string = input("Please enter Roman")

if string == x

print ("Good bye")

else

print( -this should be pulling the function)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!