Python Username and Password using if .. else September 15, 2021 Easy ways to check username and password by using simple if else statement.Ex.username = "saransh"password = "Saransh77"x = input("enter your username- ")y = input("enter your password- ")if x == username: if y == password: print("Okay Right..!")else: print("please enter correct username or password.")OUTPUT Share Get link Facebook X Pinterest Email Other Apps Labels Python Decision Making Share Get link Facebook X Pinterest Email Other Apps Comments
Swap two variables in one line November 19, 2021 X = 77 Y = 708 X,Y =Y,X print("after swapping x value and y is- ",X,Y) Read more
Comments
Post a Comment