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
sathya5 Answers
New AnswerBecause 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?
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
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message