Challenge 1 – Nice to meet you

For your first challenge you need to ask the user their name and then print out a friendly greeting.

Can’t access YouTube? Click here for the Google Drive Version

 

Bronze

 Ask the user to input their name and print out a suitable response

 Save your code in a file called challenge1.py

Silver

  Clear the screen before your program starts and after it finishes

Gold

 Convert the input to title case ( capitalising the first letter of each word in the users name input)

 

 

Challenge 2 – Personal Info App

For this challenge you need to ask the users three questions and then display the user’s answers back to them.

Can’t access YouTube? Click here

 

Bronze

  Ask all the questions and display the answers back to the user as appropriate.

Silver

  Clear the screen before your program starts and after it finishes.

Gold

 Add an app title to the top of your app.

 Convert the input to title case ( capitalising the first letter of each word in the users name input)

Challenge 3 – Post Code app

In this challenge you need to make an app that asks the user to enter their postcode in 4 separate parts. It then display’s their postcode back to them.

Can’t access YouTube? Click here


Bronze

  Asking for their postcode in 4 parts and printing out their postcode.

Silver

 Clearing the screen and generally making things look pretty.

Gold

 Correct formatting of the postcode output on one line and capitalising the letters.

Challenge 4 – Song Swapper App

In this app you need to write a program that asks for the user’s name and then adds their name in to a song’s lyrics.

Bronze

 correct input and printing out of the song

Silver

 capitalising the user’s input.

Gold

 use the the sleep method(see below) and the system clear to improve your program

Sleep Method

I forgot this in the video…ooops! You import time, then use the time.sleep(seconds) to add a pause to your program!

import time

time.sleep(1)

Have a go at this plenary Kahoot as a class to see what you have learnt.

Click here

Cheat sheet

print(‘hello world’) – prints data out to the screen

name = input(“What’s your name”) – Asks the user for input and stores it in a named variable

, (comma) – separates items in a print with a space

+(plus) – combines two items in a print without a space

\t – Adds a tab to a string of text

\n – Adds a new line to a string of text

import os – imports the os module, so you can use the os.system(‘clear’) to clear the screen

os.system(‘clear’) – clear’s the screen

import time – imports the time module, so you can use the sleep function

time.sleep(1) – gets the program to wait for a second in between lines of code.