Video 1 - The Basics
Video 2 - Advanced
Get the computer to ask the user is they want some advice. If they do, give them some!
- Ask the user to input and if they respond with yes then give them advice
- Use an else statement to give them a response if they don’t say yes.
- Use an if / elif combo to respond to all yes/no answers and an else to give a response to all other input.
- Use the .lower() method to change all input to lowercase.
Days of the week nursery rythme
- Ask the user to enter they day of the week they were born. Print out a suitable response, based on the nursery rhyme.
- Add an else: statement if they input an invalid response.
- Use the .lower() method to convert their input to lowercase.
The nursery rhyme text in full:
Mondays child is fair of face,
Tuesdays child is full of grace,
Wednesdays child is full of woe,
Thursdays child has far to go,
Fridays child is loving and giving,
Saturdays child works hard for his living,
And the child that is born on the Sabbath day
Is bonny and blithe, and good and gay.
- Ask the user to enter their password. Check if the password is correct or not and print out a suitable response.
- Ask the user to enter both a username and password and check both, printing out a suitable response as necessary.
- If the user enters an invalid username, print out ‘username not found’, otherwise print out ‘invalid username / password combination if anything is incorrect.
Mini Quiz Program
Make a general knowledge quiz using your python knowledge from the last 2 weeks!
- Make a 3 question quiz that checks the user’s input against the correct answer.
- Make a 5 question quiz that uses .lower() to allow for capital letters or lowercase
- Make a 10 question quiz that clears the screen in between each question.
A couple of Kahoots to use for a fun plenary: