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.

Challenges:

 
  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.

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.