Advertisement
Guest User

Untitled

a guest
May 1st, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. num = int(input("What number do you want to convert to a roman: "))
  2. print('Number\t','Roman Numeral')
  3. if num <= 3:
  4. print(num,'\t', end='')
  5.  
  6. while num > 0:
  7. print('I', end='')
  8. num = num - 1
  9. print()
  10.  
  11. if num == 4:
  12. print(num, '\tIV')
  13.  
  14. if num >= 5 and num <= 8:
  15. print(num, '\tV', end='')
  16.  
  17. while num > 5:
  18. print('I', end='')
  19. num = num - 1
  20. print()
  21.  
  22. if num == 9:
  23. print(num,'\tIX', end='')
  24. print()
  25.  
  26. if num == 10:
  27. print(num,'\tX', end='')
  28. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement