Please use proper tags when posting.
Here is a working example
Here is a working example
#! /usr/bin/env python3 roman = { 'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, 'M':1000 } def convert(rn): converted = [] for val in rn: if val in roman.keys(): converted.append(roman[val]) return sum(converted) print(convert('XVI'))
Output:16
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags