What is wrong with my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answers
+ 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