Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numerals = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
- def convert(roman):
- amount = 0
- if roman in numerals:
- for roman in numerals:
- if numerals[roman] > numerals["V"]:
- amount += numerals[roman]
- print(amount)
- else:
- print(0)
- convert("I")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement