+ 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 odpowiedzi
+ 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