PY
py
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
# for/in is a loop, and looks at each digit of what is stored
# in the variable ime and sets it to c.
# set ime to "10" instead of input and see what happens (click run)
ime = "10"
# for/in loops twice, because there are two digits in "10"
# c is first "1" and gets printed, then c is "0" and gets printed
for c in ime:
print(c)
# so let's see what that is doing in the rest of your code
#
# first, the value of c is "1" and looks for a match, it does
# right away and prints "I", then c is "0" and it looks for a match,
# but there is no match and the program ends with only print "I"
# what you want to do is compare "1" and "0" together as "10" to match
# with the last 'elif' to output "X".
#
# so how could you change your if/elif code:
# if(c == "1"), elif(c == "2")... elif(c == "10")
#
# to use the whole number, rather than each digit of a double digit
# number?
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run