-
Notifications
You must be signed in to change notification settings - Fork 0
/
QUESTION 5A
41 lines (33 loc) · 1.52 KB
/
QUESTION 5A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Template
#!/usr/bin/env python3
# Name: <Samuel Addae Forson>
# Index number: <PS/ITC/14/0040>
# TODO: Put your codes here ...
my_input = "2345678901"
Zero = ["****** ", "* * ", "* * ", "* * " , "* * " , "* * " , "****** "]
One = ["* ","* ","* ","* ","* ","* ","* "]
Two = ["****** ", " * "," * ", "****** ", "* ","* ", "****** "]
Three = ["****** ", " * "," * ", "****** ", " * "," * ", "****** "]
Four = ["* * ", "* * ","* * " , "****** ", " * "," * "," * "]
Five = ["****** ", "* ","* " , "****** ", " * ", " * ", "****** "]
Six = ["****** ", "* ","* " , "****** ", "* * ", "* * ", "****** "]
Seven = ["****** "," * " , " * ", " * ", " * ", " * ", " * "]
Eight = ["****** ", "* * ", "* * ", "****** ", "* * " , "* * " , "****** "]
Nine = ["****** ", "* * ", "* * ", "****** ", " * " , " * " , "****** "]
Digits = [Two, Three, Four, Five, Six, Seven, Eight, Nine, Zero, One]
# TODO: Print all the digits on the same line
try:
row = 0
while row < 7:
line = ""
column = 0
while column < len(my_input):
# TODO: Put your code after this comment
line += Digits[column][row]
column += 1
# TODO: Print line here and add an incrementer
print (line)
row += 1
except:
# TODO: Handle one suitable error which may occur
pass