+ 1

How do I make this work?

spannum = ("zero", "uno", "dos", "tres", "cuatro") x= input() print(spannum[x])

1st Dec 2016, 4:46 PM
Dania Miller
Dania Miller - avatar
4 Answers
+ 3
spannum = ["zero", "uno", "dos", "tres", "cuatro"] x = int(input()) print(spannum[x])
1st Dec 2016, 5:04 PM
Samuel Ć Ășr
Samuel Ć Ășr - avatar
+ 3
@Dania Miller np â˜ș
1st Dec 2016, 7:47 PM
Samuel Ć Ășr
Samuel Ć Ășr - avatar
+ 1
@Samuel SĂșr Thank you, it worked!
1st Dec 2016, 7:22 PM
Dania Miller
Dania Miller - avatar
0
stk = ('wow', 'end', 'cik', 'vin') x = int(input()) if x in range(4): print(stk[x]) else: print('Put right number!')
5th Jul 2017, 10:54 AM
mpampis