मराठी

Write a program to input username and password and to check whether the given username and password are correct or not.

Advertisements
Advertisements

प्रश्न

Write a program to input username and password and to check whether the given username and password are correct or not.

कोड लेखन
Advertisements

उत्तर

Compare the entered username and password with the valid username and password.

username = input("Enter username: ")
password = input("Enter password: ")

if username == "admin" and password == "admin123":
    print("Username and password are correct")
else:
    print("Username or password is incorrect")
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1: Review of Phython - EXERCISE [पृष्ठ २७]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 1 Review of Phython
EXERCISE | Q 22. | पृष्ठ २७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×