01: Python: Output

Debug it:

Write a program that displays an output
Output: Write a program that displays an output

Debugging means finding and fixing errors (bugs) in your code.

Below is some code that has been deliberately broken so that you can find and fix some common mistakes when writing code that outputs text.

This code should output the following:

Three
Two
One
Blast Off!

Hints: Check the brackets and quotation marks.

Your code won’t run at all until you’ve fixed all of the errors: You need to fix all the lines of code even before the first line will run.

Python is case sensitive: be careful with CAPITAL LETTERS and lowercase letters.

 

On the next page you’ll get some ideas for how to write your own projects that output text to the screen.

9 thoughts on “01: Python: Output

  • Pingback: Python for beginners: free interactive self marking activities

  • February 26, 2019 at 12:49 pm
    Permalink

    it was amazing

    Reply
    • January 6, 2021 at 10:46 am
      Permalink

      the work was really cool

      Reply
  • February 25, 2020 at 1:02 pm
    Permalink

    VERY USEFUL 🙂 XXXXXX

    Reply
  • January 6, 2021 at 5:29 pm
    Permalink

    Thank you so much for removing the Google Adverts and your swift response. Do you have somewhere dontations can be made or similar to make up for the lost revenue, I’d throw in a least a cup of coffee…

    Reply
    • January 7, 2021 at 8:58 pm
      Permalink

      You’re welcome. That’s a very kind offer but don’t worry about it – I’ll switch to a different ad provider that doesn’t show such intrusive ads or gives more control over where they’re placed. Look after yourself – all the best for this new lockdown.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *