0

Lists , why won’t it run please help

fruits = ["apple", "cherry", "banana", "kiwi", "lemon", "pear", "peach", "avocado"] num = int(input()) if num < 0 or num > 7: print("wrong number") else: print(fruits[num])

2nd Jun 2022, 8:44 AM
Mbalenhle Shamima Nhlapo
Mbalenhle Shamima Nhlapo - avatar
2 Réponses
+ 2
It works fine, what's your issue?
2nd Jun 2022, 8:47 AM
Slick
Slick - avatar
+ 2
Okay i fixed something a small letter into a capital one … thank you
2nd Jun 2022, 8:49 AM
Mbalenhle Shamima Nhlapo
Mbalenhle Shamima Nhlapo - avatar