PASSWORD | Sololearn: Learn to code for FREE!



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

8/23/2019 6:15:21 PM


5 Answers

New Answer


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


It seems to work okay for me? Running it through Pydroid allowed it to run correctly, so maybe you had set something up incorrectly?


What should be your expected output?


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


Faisal I used Pycharm and still got the same issue