10: Logic Errors in Python

Extend it:

Find and fix common errors in your code

Logic errors in Python: Find and fix common errors in your code

The image below was originally from AG Careers and attempts to show a variety of routes into agricultural STEM jobs.

STEM Careers ‘flowchart’ from AG Careers

The idea is that you start in the top left of the diagram and ask yourself lots of questions before finding out a job suggestion that you might want to consider.

The code below attempts to start turning the diagram above into a python program. It works through the questions on the left of the diagram and leaves the rest for you to follow the diagram.


  1. Extend the careers advice program to follow the ‘flowchart’ above

    So far the python program asks the questions you see if you follow the pathways to the left on the diagram. You need to add more input() and if statements

  2. Redraw the flowchart so that it uses the correct symbols!

    The diagram above is a pretty horrible example of a flowchat as it uses the wrong shapes. If that bugs you, use something like PowerPoint or draw.io to redraw it properly.

  3. Create your own careers advice program that recommends different jobs

    You can ask whatever questions you like and suggest whatever jobs you think most appropriate. Do some research so that you can say what salary you’d expect to earn for each job too.

There’s loads of possible ways of approaching these challenges so they only self mark in the following ways:

  • You need to use input() at least 5 times
  • You need to write at least 50 lines of code (not including blank lines)

Use your imagination and creativity alongside your logical thinking skills to see what you can create.

4 thoughts on “10: Logic Errors in Python

  • February 26, 2019 at 10:33 am

    Shocking website!! I could not get the output without changing the browser which is not what a website should do!

    • February 26, 2019 at 11:38 am

      Shocking feedback!! Please could you let me know what browser you were using and what problem you had so I can improve the shocking website painstakingly put together for free in my spare time. It’s a long way from perfect. Alternatives are available.

  • March 26, 2020 at 3:53 pm

    Hiya, great website, the pound sign(£) creates a unicode error and the code will not run. If you delete the £’s it runs fine. I have tried this in Edge and Chrome.

    • March 26, 2020 at 8:34 pm


      Thanks so much for getting in touch and reporting that bug. It should now be fixed – all strings should support unicode characters. Sorry about that!

      All the best 🙂


Leave a Reply

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