Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

How can leasing allow a firm to effectively depreciate land?

Answered: 1 week ago