Using PYTHON, write a while loop for a login system. The program should ask the user for his/her username and password. If it is wrong, it should keep asking for his/her username and password. If true, the while loop should terminate and let the user know that he/she successfully logged in. For a correct authentication, use johndoe for the username and secret1234 for the password. For example: Please enter your username: johndoe Please enter your password: 12345 Sorry, your username or password is incorrect. Please try again. Please enter your username: john Please enter your password: secret1234 Sorry, your username or password is incorrect. Please try again. Please enter your username: johndoe Please enter your password: secret1234 You entered the system successfully.
Using PYTHON, write a while loop for a login system. The program should ask the user for his/her username and password. If it is wrong, it should keep asking for his/her username and password. If true, the while loop should terminate and let the user know that he/she successfully logged in. For a correct authentication, use johndoe for the username and secret1234 for the password. For example: Please enter your username: johndoe Please enter your password: 12345 Sorry, your username or password is incorrect. Please try again. Please enter your username: john Please enter your password: secret1234 Sorry, your username or password is incorrect. Please try again. Please enter your username: johndoe Please enter your password: secret1234 You entered the system successfully.
Chapter5: Looping
Section: Chapter Questions
Problem 15E
Related questions
Question
- Using PYTHON, write a while loop for a login system. The program should ask the user for his/her username and password. If it is wrong, it should keep asking for his/her username and password. If true, the while loop should terminate and let the user know that he/she successfully logged in. For a correct authentication, use johndoe for the username and secret1234 for the password.
For example:
Please enter your username: johndoe
Please enter your password: 12345
Sorry, your username or password is incorrect. Please try again.
Please enter your username: john
Please enter your password: secret1234
Sorry, your username or password is incorrect. Please try again.
Please enter your username: johndoe
Please enter your password: secret1234
You entered the system successfully.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,