replit

Before you start this course, you must login to Replit

If you have forgotten your Replit account user name or password, ask your Coder Coach.

CodeSports

6.2-Investigate

Instructions

  • In investigate tasks you are given some example code.
  • Underneath it are questions to make sure that you understand how the code works.
  • Use comments to answer the investigate questions on the example code.

Key concept

The key idea here is that when we use functions our code will no longer run in line order, instead it will jump from the main program to each function called and back again.

Help! My code doesn’t work

Make sure that you check for the following things:

  • The subroutine name is identical everywhere it is used (capitals matter)
  • The function call is not indented inside the function
  • The function is defined before it has been called

Hints