Do while looping in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do while looping in Python

I’m stumped, any ideas on how to create a do while loop that will loop 3 times. That involves having a user input a password and finally getting that password right in order to move on.

5th May 2018, 1:31 PM
Janice N Pierce
Janice N Pierce - avatar
6 Answers
0
my try getting EOFerror but it's not my code issue run it on pc may it will work fine https://code.sololearn.com/cxWxi7tAkn3Y/?ref=app
5th May 2018, 2:04 PM
Yugabdh
Yugabdh - avatar
+ 1
No once it’s correct it will move on. But the user gets three opportunities to check his code
5th May 2018, 1:44 PM
Janice N Pierce
Janice N Pierce - avatar
0
am not sure, how about u try using the 'take while', without the parentheses
5th May 2018, 1:39 PM
ghali lawal
ghali lawal - avatar
0
Your going to check password 3 times or its like if password is correct it going to exist from while loop
5th May 2018, 1:41 PM
Yugabdh
Yugabdh - avatar
0
Check the password 3 times and then once successful move on to the next part of code.
5th May 2018, 1:42 PM
Janice N Pierce
Janice N Pierce - avatar
0
Means even it's correct still your going to check ?
5th May 2018, 1:43 PM
Yugabdh
Yugabdh - avatar