483,036 views
15 votes
15 votes
Write a program to check the password( qbasic)​

User Berkcan
by
2.8k points

1 Answer

17 votes
17 votes

Answer:

Assuming this is in python:

def check_password(password):

correct_password = "qbasic"

if password == correct_password:

return True

else:

return False

def main():

user_input = input("Type in your password: ")

if check_password(user_input):

print("Correct!")

else:

print("Wrong, try again")

main()

Step-by-step explanation:

Hope this helped :) If it wasn't suppose to be in python, tell me so I can make it in the correct programming language.

Have a good day :)

User Oyvindhauge
by
3.2k points