Quiz Program – Part 1: the basic quiz

Step 2 – More printing

When your program ran it opened up a new window.

This is called the IDLE Shell. It's the place where your code runs and does whatever it's supposed to do.

  1. Start by closing the IDLE Shell window

    Your program code window should still be open

It's much easier to close the Shell each time you've finished running the program.

More printing

Let's tell the user a little bit about the quiz first.

Code helper image
  1. Underneath your code to display the title, type:   print("Welcome to my quiz")
  2. Run your code (Run > Run Module)

Python will ask you to save your code each time you make a change and then run it. Just say OK each time.

This should look OK, but there's something simple we can add straight away.

Code helper image
  1. Create a blank line between the title code and the welcome (press Enter at the end of the first line)
  2. Type this code:   print()
  3. Run the code (they keyboard shortcut for running code is the F5 key)

This simply leaves a blank line after the title. Which I think looks a lot nicer.

Now do: What else could you add to the welcome?