23 lines
699 B
Python
23 lines
699 B
Python
|
|
number = input("Inserisci un numero: ")
|
||
|
|
|
||
|
|
digits = [
|
||
|
|
["###", "# #", "# #", "# #", "###"], # 0
|
||
|
|
[" #", " #", " #", " #", " #"], # 1
|
||
|
|
["###", " #", "###", "# ", "###"], # 2
|
||
|
|
["###", " #", "###", " #", "###"], # 3
|
||
|
|
["# #", "# #", "###", " #", " #"], # 4
|
||
|
|
["###", "# ", "###", " #", "###"], # 5
|
||
|
|
["###", "# ", "###", "# #", "###"], # 6
|
||
|
|
["###", " #", " #", " #", " #"], # 7
|
||
|
|
["###", "# #", "###", "# #", "###"], # 8
|
||
|
|
["###", "# #", "###", " #", "###"], # 9
|
||
|
|
]
|
||
|
|
|
||
|
|
for row in range(5):
|
||
|
|
line = ""
|
||
|
|
for ch in number:
|
||
|
|
digit_index = int(ch)
|
||
|
|
segment = digits[digit_index][row]
|
||
|
|
line = line + segment + " "
|
||
|
|
print(line)
|