The code snippet below contains each of these key python programming concepts. Can you identify which line number they're on?
Being able to understand and use the right words to describe the code you're looking at helps you know what to search for and how to ask for help when you're writing your own code
Testing code for 29 keywords...
What do you think this program will output? What values do you think each variable will hold?
Write each prediction of what the program will output.
You can also predict variable values e.g. a = 10
Predict / Run
See how accurate your predictions were. Did the code behave as you expected?
Experiment by editing the code.
- Try the program with different input data
- Run it line by line (Ctrl and full stop) to see how variables change.
- Read through the comments and see if there are any challenges to complete
- Change the values of some variables or constants and see how that affects the program
- Is there any input data that can crash the program?
- Change the logic of the program to make it do something different
- Add comments explaining what you've discovered
This code has been sabotaged with some common mistakes. Can you find and fix them all?
Click on the button to add 5 more errors to the code
Use your creativity along with what you've learned to create your own python project.
You get more points for each python skill you use from the keywords section
Click on "tests" to see a description of which python skills to aim for and keep track of which ones you've already used