- Beginner's tutorial
- Basic Example
- Advanced tutorial
- Advanced Example
- Challenge 13
- ASCII Art
Challenge 13 – Login Screen App
Login Screen App
- Create an app that repeatedly asks the user for their password until the correct password is entered.
- Adapt your program so that it asks for both a username and password.
- Use os.system(‘clear’) and time.sleep(1) to improve your app.
- Limit the number of login attempts using a variable to keep track
Challenge 14 – Joke App
Everybody loves jokes! Create an app that asks users if they want to hear a joke.
If they answer yes tell them a joke.
Keep repeating the question until they answer yes.
- Ask the yes/no question, when they answer yes break out of the loop and tell the joke.
- If they answer no, provide suitable feedback and ask the question again.
- Use the .lower() method to accept lower or uppercase input.
- Clear the screen and use time.sleep() where appropriate make your app awesome.
- Add some ASCII Art to your joke app.
Challenge 15 – Darts 501 to zero Score calculator
In darts players start at 501 and work their way down to zero. Create an app that keeps track of the player’s score and tells them when they have reached zero.
- The app should create a score variable, set it to 501 and then keep asking the user to enter their score until they get down to zero.
- The program should tell the user how many throws they took.
- The program should only accept number inputs and only accept inputs between 0 and 180.
- Create a two player version of the game and let the players know who has won.
Challenge 16 – Random number guesser game
You should write a program that asks the user to guess a random number.
- Generate a random number between 0 and 100 and ask the user to guess the number.
- Keep asking the user to guess until they correctly guess the hidden number.
Give the user a hint each time to tell them if they are too high or too low.
- Keep track of how many guesses the user made and tell them at the end.
- Add the option to select a difficulty level and give them a different number of guesses depending on the option selected.
- Easy – unlimited tries
- Medium – 10 tries
- Hard – 5 tries.
How to display ASCII Art in your programs