PASSWORD | Sololearn: Learn to code for FREE!

0

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

8/23/2019 6:15:21 PM

sathya

5 Answers

New Answer

+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

+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?

+3

What should be your expected output?

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

0

Faisal I used Pycharm and still got the same issue