226k views
1 vote
Write a program to check the password( qbasic)​

User MrGoofus
by
4.7k points

1 Answer

5 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 Jeferson
by
5.0k points