What is wrong with my code | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What is wrong with my code

Given a list of number, output ā€œbingoā€ if it contains an input number. Do not output anything if the number is not found x = [42, 8, 7, 1, 0, 124, 8897, 555, 3, 67, 99] num = int(input()) Code if ("x in num"): print("bingo") Itā€™s saying Iā€™m getting 4/6 problems correct but donā€™t know what Iā€™m doing wrong that Iā€™m not getting all of the problems right

13th Jan 2022, 1:22 AM
NW1121
2 Respostas
+ 3
... if num in x: ...
13th Jan 2022, 1:32 AM
Slick
Slick - avatar
0
If code is wrong x in num is in string do it as like if num in x: Print("bingo")
13th Jan 2022, 3:15 PM
Hellock