Minds On
Active transportation
Active transportation is using human power to get from one place to another. This includes types of transportation such as walking, biking, skateboarding, in-line skating, using a scooter and travelling using a non-motorized wheelchair.
Think about which active transportation types could be used based on where a person needs to go.
There are multiple ways people can travel to their destination.
For each example, select the corresponding possible action.
What are some other ways that people can travel to these different locations?
What are some ways that people use active transportation to move around your community?
What are some of the benefits of active transportation? How might communities encourage and support active transportation?
Record your ideas digitally, orally or in print.
Action
Conditional statements
Conditional sentences contain two parts. One part beginning with “if” describes a scenario and the second part describes the consequence or action.
For example,
If it begins to snow, then I will wear a jacket.
In coding, computers use conditional statements to make decisions based on certain conditions.
A conditional statement is phrased as:
if <condition is true> then
<do this>
The condition is checked by the computer. If it is true, then the computer will do an action.
In the Minds On, we figured out which type of active transportation a person might use depending on:
- the specific place or location they are traveling to
- the distance they need to travel
Let’s explore how to turn these examples into conditional statements.
if visiting a neighbour that lives on the same city block then
they might walk
Consider the following questions and record your answers using a method of your choice. If possible, share with a partner.
-
Identify the condition in the following conditional statement:
if visiting a neighbour that lives on the same city block then
they might walk
Press ‘Answer’ to access the condition in the conditional statement.
The conditional statement is: visiting a neighbour that lives on the same city block.
-
What is the action that occurs if the condition is true?
Press ‘Answer’ to access the action that occurs if the condition is true.
The action that occurs if the condition is true is “they might walk.”
-
What would the conditional statements be for the other examples from our Minds On? Remember to use the words “if” and “then.” You can also include a different type of active transportation than what is provided.
going to the local library 5 km away they might bike going to the neighbourhood skate park they might skateboard Press ‘Answers’ to access conditional statements for the other examples.
going to the local library 5 km away they might bike if going to the library 5 km away then
they might bike
going to the neighbourhood skate park they might skateboard if going to the neighbourhood skate park then
they might skateboard
-
Apart from active transportation what are some other types of transportation that a person might use to get to these locations?
Press ‘Possible answer’ to access other types of transportation a person might use.
Car, streetcar, subway, bus etc.
Check your learning
Complete the following conditional statements.
For each condition, select the corresponding action.
Pseudocode

Let’s examine some pseudocode for conditional statements. These will include examples that we might code a computer to do.
Pseudocode
Pseudocode is an informal way of describing a computer program or algorithm that acts like a bridge between everyday language and programming code.
Example 1
The following code might be used in a computer game where the user gets a point for guessing the correct number:
if userGuess == secretNumber then
output: change userPoints by 1
In this example, the program is checking the condition to identify if the userGuess entered is equal to the secretNumber the computer has stored in its memory.
In this case, we use something called a comparison operator. In many coding languages, the symbol we use for a comparison operator to check if something is equal to something else, is two equal signs (==). If the condition is true, and the user guessed the correct number, they will get a point.
Let’s find out how to apply this code to the idea of active transportation and physical activity.
Active transportation is a form of physical activity since this type of transportation is human-powered. Physical activity can help improve a person’s health and well-being in different ways.
The World Health Organization recommends specific amounts of physical activity a person could try. For example, for children and adolescents from 5 to 17 years old, the World Health Organization recommends 60 minutes of physical activity each day.
When the conditional statement uses this information from the World Health Organization as a comparison operator, then we have the following.
if physical activity > 60 then
output: “above recommended levels”
If a user inputs 90 minutes, then the computer would use the code to determine how active that person would be according to the recommendations of the World Health Organization.
The computer would determine that 90 minutes is greater than comparison operator and would say that this is “highly active.”
Try it!
Explore the following tasks and write conditional statements for each. You may record your statements using a method of your choice.
- Write a conditional statement for checking if the amount of physical activity is less than 60 minutes, and if it is true, then output “below recommended levels.”
- According to the World Health Organization, the recommended minutes of physical activity for a preschooler are 180 minutes a day. Write a conditional statement for checking to see if 90 minutes is above or below recommended levels.
Press ‘Reveal’ to check your answers!
Task 1: Write a conditional statement for checking if the amount of physical activity is less than 60 minutes, and if it is true, then output “below recommended levels.”
Answer 1:
if physical activity < 60 then
output: “below recommended levels”
Task 2: According to the World Health Organization, the recommended minutes of physical activity for a preschooler (3-4 years old) are 180 minutes a day. Write a conditional statement to check if 90 minutes is above or below recommended levels.
Answer 2:
if physical activity = 90 then
output: “below recommended levels”
How might they travel?
Depending on the weather, people decide on active transportation methods that work best for them.
Consider what kinds of transportation methods someone might use in the winter vs. summer.
How might someone travel when it is cold and snowy?
How might someone travel when it is hot and dry?
Explore the following conditions. What kind of active transportation might someone choose for each condition?
Note: In the following examples, the temperature is hottest when it is greater than 30 (> 30) and coldest when it is less than 0 (< 0).
For each condition select the corresponding action.
Consolidation
Your turn
Now it’s your turn to write conditional statements!
Try to come up with three or more conditional statements using pseudocode.
Press ‘Hint’ to access examples of conditional statements using pseudocode from the Action section.
Example 1
The following code might be used in a computer game where the user gets a point for guessing the correct number:
if userGuess == secretNumber then
output: change userPoints by 1
In this example, the program is checking the condition to identify if the userGuess entered is equal to the secretNumber the computer has stored in its memory.
In this case, we use something called a comparison operator. In many coding languages, the symbol we use for a comparison operator to check if something is equal to something else, is two equal signs (==). If the condition is true, and the user guessed the correct number, they will get a point.
Consider another example of a conditional statement using a different comparison operator. The user is asked to enter the minutes of physical activity for a 5 to11 year old child. The range of time provided is between 0 and 180 minutes. This data is then compared to the data provided by the World Health Organization.
if physical activity > 60 then
output: “above recommended levels”
The computer is checking if the amount of time doing physical activity is greater than 90 minutes, and if it is, the computer would say “highly active”. In this example, we’ve used a greater than (>) comparison operator.
If possible, share the condition with a partner. For each conditional statement have them try to identify the action that you used.
Complete Conditional Statements in your notebook or using the following fillable and printable document. If you would like, you can use speech-to-text or audio recording tools to record your thoughts.
Conditional statement: |
---|
Conditional statement: |
Conditional statement: |
Press the ‘Activity’ button to access the Conditional Statements.
Reflection
As you read through these descriptions, which sentence best describes how you are feeling about your understanding of this learning activity? Press the button that is beside this sentence.
I feel...
Now, record your ideas using a voice recorder, speech-to-text, or writing tool.