0
Access granted
I want to write a program, when user enters crt password it should show "access granted",but if user enters wrong password it should show "try again" and asks him enter right password one more time,like wise user have 3 chances to enter password, if all 3 chances are used then it should show "access denied". I wrote some code using while loop but it is not working as i expected. Plz help where i went wrong.here is my code https://code.sololearn.com/cnwEh0XQ8d7N/?ref=app
9 Respostas
+ 6
Can you please use appropriate tags for programming language please? Thanks!
+ 3
Please tell us what you expect from this. So that we can tell you where you went wrong
0
If user enters wrong password, output should be "try again",and at the same time, user should able to enter(input) password for second time(without running the code again). or tell me for each iteration of while loop, is it possible to give differnt input?
0
It's working fine for me.
Since, it's an online compiler you need to supply all the inputs before running the code.
Try entering wrong password three times each on newline, the output will be same as your are expecting.
0
blACk sh4d0w
I dont want to enter three inputs at a time, only after knowing first time enterted input wrong i want enter second input . Is it not possible with online compiler?
0
tangella shivareddy No it's not possible in SL compiler or any other online compiler.
0
Thankyou guys
0
you gotta input 3 paswords because of how sololearn works, if you do this on a python IDE, it’ll work
0
Porn