C3.1 Solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves conditional statements and other control structures.

Activity 1: Conditional instructions related to daily life


Use unplugged coding using the "if, then, else" command.

Communicate the following conditional situations to students:

If I see the STOP sign while driving, then I stop, otherwise I continue.

If it's cold, then I wear a coat, if it's not, then I wear a sweater.

IF STOP sign, THEN stop

SINON continues

IF cold, THEN put on coat

OR put on a sweater

Discuss with students the various conditional instructions.

Ask students the following questions:

  • What do you notice?
  • Are there any differences?
  • Are there any similarities?

The student learns that pseudocode helps him/her plan his/her code.

Have the student plan a code using the pseudocode in parallel with learning a mathematical concept. The pseudocode first becomes a way for the student to remember the steps to follow.

Ask the student to write everyday situations that have the structure of "if, then, else" using pseudocode.

Activity 2: Financial literacy and conditional instructions/control structures


Communicate the following situation to students:

Aline would like to buy a television for her bedroom and her parents agree. However, she is responsible for raising the money for it.

Have students record the following information:

  • Aline's parents give her $100 as a start-up sum.
  • From Monday to Friday, Aline has chores to do at home and her parents give her $25 a week when she does them.
  • Aline helps her neighbor with outside work every weekend. Her neighbor gives her $20.
  • Aline has an online subscription to listen to the music. The fee is $10 per month.

Using the above information, create a code that will allow Aline to calculate her income and expenses in a way that will help her set a timeline for her financial goal.

The code can be created using a tool of the student's choice, such as a spreadsheet or block programming software.