PASSWORD | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

PASSWORD

from getpass import getpass username = input("Enter username") password = getpass('Enter password') if username == 'SATHYA' and password == '1234': print("LOGGED YOU IN") else: print("Wrong Credentials") I AM NOT ABLE TO GET MY DESIRABLE OUTPUT . CAN ANYONE PLEASE HELP ME

23rd Aug 2019, 6:15 PM
sathya
sathya - avatar
5 Answers
+ 5
Because the SL code playground for non-web codes requires you to input anything at the start of the program and not within the console, the getpass() function will not work on Sololearn. The program, however, works fine in any other IDE that does support a live console, so using that function would likely need you to use a separate IDE
23rd Aug 2019, 6:25 PM
Faisal
Faisal - avatar
+ 5
It seems to work okay for me? Running it through Pydroid allowed it to run correctly, so maybe you had set something up incorrectly?
23rd Aug 2019, 6:29 PM
Faisal
Faisal - avatar
0
Cbr✔[ Most active ] I wanted to enter username and password. In the output screen username comes , when I enter SATHYA it's not going to enter password
23rd Aug 2019, 6:19 PM
sathya
sathya - avatar
0
Faisal I used Pycharm and still got the same issue
23rd Aug 2019, 6:26 PM
sathya
sathya - avatar
0
If username _unhappy_soul_00 I want to this account without any OTP s
18th Oct 2023, 7:45 AM
Løvër Òf Möm
Løvër Òf Möm - avatar