Extend it:

Convert and use different types of data
Python Data types: Convert and use different types of data

Here’s a starting point for a project that plots a chart showing how many hours each day the user spends on different activities


  1. Add 3 more questions (such as how many days do you spend at school each day)

    Add more lines like 3, 4 or 5 that ask a question, convert the answer to an integer then save it into a variable

  2. Add the answers to your questions to the chart

    Add more lines like 10, 11 or 12 that display a # for each hour that the user does a particular activity

  3. Work out the percentages for each activity and display them on screen.

    Look back at the Try It example code if you want to see how to calculate the percentages.

Remember to be careful to convert data to the most suitable data type using the str(...) float(...) and int(...) functions.

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.