Question: Write a function in python that takes two strings representing roman numbers and returns their sum. For full credit, return the sum of the two

Write a function in python that takes two strings representing roman numbers and returns their sum. For full credit, return the sum of the two numbers as an int. For 1 point of extra credit write a function that takes two strings and return a string with the roman numeral of the sum instead. (You may assume all inputs are valid roman numeral strings that represent numbers less than 400/CD.)

For Example:

romanfunction('I','XI') #returns 12 (Full Credit Version)

romanfunction('I','IX') #returns 10 (Full Credit Version)

romanfunctionextra('I','IX') #returns 'X' (Extra Credit Version)

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!