Student Login

Coding Activity #7

Follow a student who is learning to code and encounters three different challenges on his way to school.

Activity #7 - Calculator Master

In this activity, we will be following a student who is learning to code and encounters three different challenges on his way to school.

  • Ontario curriculum alignment:  Grade 9
  • Best for:  Advanced coders of all grade levels!

Before you begin ...

This hands-on activity uses a free coding platform called "mBlock". If you've used Scratch before, then you will be right at home using mBlock.  To proceed, you will need to have an mBlock account (free), and be signed in. If you need help with signing up or loging into mBlock, then you can read their help doc HERE. We also have some information just below. Otherwise, skip down to STEP 1 to get started!

Open the first challenge in mBlock

Click the button below to open the first challenge in this activity. It will open in a new window/tab which allows you to keep this page open at the same time and easily switch between tabs while you work through this challenge.

  • After you open the activity, scroll down a bit and then click on the blue "Source code" button to access the activity.
  • If you are logged into your mBlock account, then you can click on the "Remix" button to save this activity to your personal mBlock account so you can save your work and also share it with others!
Open the activity

Watch this video

Create a custom calculator

First Challenge

Even with a normal calculator, the shop keeper is having trouble keeping up with calculating all the prices of the groceries for the customers. Here is where your coding expertise comes in to play!

Here’s your challenge: create a calculator to add up all the prices of groceries according to a price sheet and provide a final price for the customer. Follow along in the video to help build a calculator for the shop keeper to effectively calculate the grocery bill for customers. Good luck!

After you're done ...

Open the next activity to complete the second challenge.

After opening this activity, watch the next video below.

Open the activity

Watch this video

Paving Quote

Second Challenge

In this challenge, on his way to school, the student encounters a tradesperson who is looking for a quicker way to calculate a quote for paving the driveway. Here is where you continue to build your coding skills and help the tradesperson come up with an accurate quote, fast!

When you press the spacebar on your keyboard, the calculator you will create will help a tradesperson on the street calculate a quote for paving a driveway. There are certain fees present including a startup fee and a fee per meter squared and perimeter of paving.

Your next challenge is: create a calculator using the tools and skills you learned in challenge 1 to help the tradesperson accurately calculate all fees related to paving. Good luck!

After you're done ...

Open the next activity to complete the final challenge.

After opening this activity, watch the next video below.

Open the activity

Watch this video

Bell Curve Calculator

Final Challenge

In this challenge, the student reaches school, and the teacher explains that it’s their turn in class to predict how dropping many balls down a grid of pins will end up. Here is where you, the student, can showcase your experience by coding a bell curve. Good luck!

When you press the spacebar on your keyboard, the calculator you will create will help a the teacher show several balls fall down a grid. As they fall down the grid and touch the blue line, they will begin to distribute evenly in what is called a “bell curve”.

Your final challenge is: create a calculator using the tools and skills you learned in challenges 1 and 2 to help create this bell curve distribution. Good luck!

#207 - 8501 - 162nd Street
Surrey, British Columbia
Canada  V4N 1B2

Parents

Learn More
Book Samples
Online Platform
Pricing
Online Store
Free Trial

Teachers

Learn More
Book Samples
Teacher Resources
School Pricing

About

About Us
Contact
Privacy Policy
Cookie Policy
Terms & Conditions