Sofea is creating a new account on TikTok. The app has asked her to input a password with 8 to 20 characters. Write a program that validates the input of the user. The program should begin with the prompt “input password :”. The user should be able to input the password. If the user inputs a password that doesn’t fit these requirements display the message “Please input a password containing 8 to 20 letters: ” After the message, there should be an input prompt again. This loop should occur until an appropriate password is inputted. After an appropriate password is inputted the console should display “password has been validated”. The user must then retype the password as a double-entry check. This is done by prompting the user to type “Enter the same password :” until the user types in the same password. At the end of the program the console should display “logged in”
(Explore if and while loops)