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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started