Question: I'd like to write a python program that works in roman numerals, (i.e. you type in inputs in Roman Numerals and it gives you the

I'd like to write a python program that works in roman numerals, (i.e. you type in inputs in Roman Numerals and it gives you the answer back in Roman Numerals). It needs to calculate in +-* operators. I have managed to write the first part of the program that defines the conversions but I'm not sure how to implement that into a calculator with user input. The first half is attached.I'd like to write a python program that works in roman numerals,

def Romantoint(value): #Adapted from a piece of code written by Arnab Chakraborty on tutorialspoint.com will convert from Roman Numerals to Integers." This is achieved using A Dictionary And A key system roman = {1:1, 'V':5, 'X':18, 'L':58, 'c':180, 'D':500,"M":1000, 'IV": 4, "IX':9, 'XL:40, xc9:9e, 'c':488, 'CH":900) i rinitiolisation of Local variables nume while i e: for - in range (value Il num[i]): roman nun += sym[i] value -- nuntil i 1 return roman_num

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!