Aug-06-2018, 03:19 PM
@volcano63 & @ichabod801 = Thank you very much for your input! :)
@Windspar, can I please ask you to look into my current code?
When user input's integer, there is no roman numeral coming up?
My Terminal's Screenshot:
[Image: 060818_zpsmx8wa1rw.png]
@Windspar, can I please ask you to look into my current code?
When user input's integer, there is no roman numeral coming up?
print("[System] Hi! Enter any number between 1 and 3000 so the program will show you the old-school Roman numeral. In other words, 4 should return 'IIII'. Ready?!") num_map = [(1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'), (50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), (1, 'I')] result = int(input("Enter any number between 1 and 3000: ")) num = 0 def int_to_roman(num): result = [] for (arabic, roman) in num_map: (factor, num) = divmod(num, arabic) result.append(roman * factor) if num == 0: break return "".join(result) int_to_roman(num)===================================================================
My Terminal's Screenshot:
[Image: 060818_zpsmx8wa1rw.png]
Blockchain Visionary & Aspiring Encipher/Software Developer
me = {'Python Learner' : 'Beginner\'s Level'}
http://bit.ly/JoinMeOnYouTube
me = {'Python Learner' : 'Beginner\'s Level'}
http://bit.ly/JoinMeOnYouTube