Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input("What number do you want to convert to a roman: "))
- print('Number\t','Roman Numeral')
- if num <= 3:
- print(num,'\t', end='')
- while num > 0:
- print('I', end='')
- num = num - 1
- print()
- if num == 4:
- print(num, '\tIV')
- if num >= 5 and num <= 8:
- print(num, '\tV', end='')
- while num > 5:
- print('I', end='')
- num = num - 1
- print()
- if num == 9:
- print(num,'\tIX', end='')
- print()
- if num == 10:
- print(num,'\tX', end='')
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement