Can you help me with this code please? | Sololearn: Learn to code for FREE!

0

Can you help me with this code please?

Coding question https://code.sololearn.com/csHZc160R7V3/?ref=app

9/17/2021 2:32:44 PM

Emma Cooke

8 Answers

New Answer

+2

ok - i found it: Given a list of numbers, output "bingo" if it contains the input number. Do not output anything if the number is not found. so the code could be like: x = [42, 8, 7, 1, 0, 124, 8897, 555, 3, 67, 99] num = int(input()) if num in x: print('bingo') doing it with a for loop: x = [42, 8, 7, 1, 0, 124, 8897, 555, 3, 67, 99] for lst_num in x: if num == lst_num: print('bingo')

+1

Change your second lines variable name as num becoz you used same variable name for both the lines python takes the last variable name so you have stucked .Hope this info helps all.

0

Emma Cooke , please specify the name of the python tutorial , also the lesson / exercise number. to give qualified help, we need to see the task description. thanks!

-1

I'm not sure tbh. I'm new to this so it's all trial and error. Just trying it for a bit of fun.

-1

Comment or remove 2nd line of taking user input. What are you trying with this code? pls add more details...

-2

says to activte my account to use ‘messenger’; how on earth do I do that, received no such email.

-2

how do I access code I’ve written?? where is it?

-2

is there no tutorial for this app?