why if statement is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
6th Feb 2020, 7:39 AM
Somil Khandelwal
12 Answers
+ 3
Oma Falk and Somil Khandelwal We can also check like this. if comp[0] == 3:
6th Feb 2020, 7:51 AM
A͢J
A͢J - avatar
+ 2
Change your condition with this if comp == [3]:
6th Feb 2020, 7:43 AM
A͢J
A͢J - avatar
+ 2
Somil Khandelwal You can use @ in comment to tag people.
6th Feb 2020, 7:54 AM
A͢J
A͢J - avatar
+ 1
put line 5 into while loop
6th Feb 2020, 7:41 AM
Oma Falk
Oma Falk - avatar
+ 1
whats wrong?
6th Feb 2020, 7:47 AM
Oma Falk
Oma Falk - avatar
+ 1
Oma Falk comp giving output in array like this [2] or [3] and we can't compare with int value directly.
6th Feb 2020, 7:49 AM
A͢J
A͢J - avatar
+ 1
🅰🅹 - Sʀ. Sᴏғᴛᴡᴀʀᴇ Eɴɢɪɴᴇᴇʀ right... see it working now and asked if there are still problems
6th Feb 2020, 7:50 AM
Oma Falk
Oma Falk - avatar
+ 1
Wasi unfortunately not on SL.
6th Feb 2020, 7:59 AM
Oma Falk
Oma Falk - avatar
0
oma Falk code is still not working
6th Feb 2020, 7:44 AM
Somil Khandelwal
0
SR.software engineer Thanks pal
6th Feb 2020, 7:47 AM
Somil Khandelwal
0
You can import time and use time.sleep(1) to make that work.
6th Feb 2020, 7:57 AM
Wasi
Wasi - avatar
0
request ,json,time and many module are not working in this app why?
6th Feb 2020, 8:00 AM
Somil Khandelwal