- 3
Python cycle
Help! why if statement doesn't work? https://code.sololearn.com/c1lKqI140Jc3/?ref=app
19 Answers
+ 3
Dark_Ren see if you will input wrong answers while loop won't run and your if Loop is inside while loop
that's why I said previously in my answer do
while True :
+ 2
I would like to know why someone disliked my answer or I would have to report about it ,
also Dark_Ren I think I provided the right answer according to your question ,if you still have any doubts let me know
+ 2
Dark_Ren what are your inputs? As while loop only runs when the inputs are yes no and maybe
And if while loop won't receive correct input it won't run and eventually if Loop won't too
+ 2
Dark_Ren See this code to understand Abhay 's point.
https://code.sololearn.com/c0NDdMTiRllM/?ref=app
+ 2
Dark_Ren If you want to make something like that,
Example, If I gave wrong input
Then while loop runs again
And if I gave the right input then I'll get the result??
If I am right let me know!
+ 2
Dark_Ren That's Brilliant!
PS. Try/Except is too good to use
+ 1
Explosive Creativity :D Taran Grover thanks!
+ 1
Abhay ok tanks
0
Exactly Explosive Creativity :D
0
it won't work if inputs aren't in the right order(yes,no and maybe)
0
Explosive Creativity :D Taran Grover can you explain how can i do this in IDLE on the computer? I need to create a multiple choice question. PLEASE!
0
Dark_Ren Create a new window in idle
2. Write your code
3. Save that file
4. Now time to run
0
Dark_Ren waiting for new code bruh
0
Dark_Ren My laptop's on charge right now,
Tomorrow I'll send you my most recent project
I tried to complete it in 1day
And It's done!
Don't forget to see your dm
0
Abhay i still don't understand how to do this so... i think nobody get what i need
0
Abhay my inputs are correct in right order yes, no, maybe, and then output is "Right!" but i need elso when i input wrong answers to output "wrong! try again!" and then cycle repeating.
0
Taran Grover yaas you are right, but thank you I've already done it!