0% found this document useful (0 votes)
13 views102 pages

P5 - Final Term To Review

The document provides an overview of spreadsheets, including their structure, types of data, formulas, and functions. It also discusses components of robots, such as sensors, controllers, and actuators, as well as the importance of algorithms in programming. Additionally, it covers concepts like debugging, conditional statements, and variables in coding, along with practical examples and exercises related to microcontrollers like Micro:bit and Arduino.

Uploaded by

jd413987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views102 pages

P5 - Final Term To Review

The document provides an overview of spreadsheets, including their structure, types of data, formulas, and functions. It also discusses components of robots, such as sensors, controllers, and actuators, as well as the importance of algorithms in programming. Additionally, it covers concepts like debugging, conditional statements, and variables in coding, along with practical examples and exercises related to microcontrollers like Micro:bit and Arduino.

Uploaded by

jd413987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

Computing

P5
Spreadsheet
Spreadsheet
Spreadsheet software
• A spreadsheet is used to store information and make
calculations. It is a grid of rows and columns.

(a) Paper Spreadsheets (b) Spreadsheet on Computer


Spreadsheet software
Rows, columns and cell references

• The rows of the spreadsheet are labeled with numbers.

Example of a Row in the Spreadsheet (Row 1)


• The columns of a spreadsheet are labeled with alphabets.

Example of a Column in the Spreadsheet (Column B)


• A cell is where a column crosses a row.

Example of a Cell where Column B crosses Row 2


• The cell reference is the name of the cell. Cell reference is
made up of the column(letter) and row(number).

Example of Cell References (C3, D6, E9)


Reading a spreadsheet
• To read a spreadsheet, use the rows and columns to describe
data.

• To name a cell, start with column letter, followed by the row


number.

• For example: cell C5


Changing the row height and column width
• Select a row by clicking the number.

• Move your cursor to the bottom edge of the row, below the
number. The cursor changes from an arrow to an icon like this

• Click and drag the cursor symbol to the row height you want.
Two types of data in a spreadsheet
1. Values are numbers. They are on the right side of the cell.

2. Labels are texts. They show what the values mean. They are on
the left side of the cell.

Labels and Values in a Spreadsheet


Formula
A formula is a mathematical calculation in spreadsheets that uses
arithmetic operators to calculate results. The formula must start
with an equal sign(=).
Example of a Formula to add the numbers
Function
A function is a command that lets you make specific calculations
without the operators. SUM function is used to add the numbers.

How to Write a Function


Functions

Returns the maximum value in a


numeric dataset.

Returns the minimum value in a


numeric dataset.
Functions

Returns the sum of a series of


numbers and/or cells.

Returns the difference of two


numbers. Equivalent to the `-`
operator.
Example of a Function to add the numbers
Adding new sheet
There can be more than one sheet in one spreadsheet file.

Each worksheet can be renamed.

Multiple sheets
How to use cell reference from another sheet
Challenges:
1. What are the benefits of using a spreadsheet?

2. Do you think making calculations in a spreadsheet is more


convenient than using a paper, calculator and pen? Why or why
not?
Exercise
Imagine that you own a pizza shop. You will use the spreadsheet
to record the costs and income of a snack bar that sells pizza
slices and desserts.
Parts of a robot
1. Sensors: These could be any parts of a robot acting as eyes
and ears to get information from the surroundings or the input
data.

2. Controller: This is the brain of a robot that carries out the


instructions.

3. Actuators: Motor is an example of an actuator that moves the


robot's part such as arms or wheels.
Parts of a robot
Microcontroller
• Microcontroller is a small computer on a integrated circuit.

• It is mainly used to control devices.


Microprocessor
• Microprocessor is used to process information, manage
instruction and perform calculation.

• A microprocessor can not control any external device directly.


Common sensors in robots
● Video camera: Gives the robots sight

● Temperature sensor: Measures the temperature

● Light sensor: Measures the light level

● Proximity sensor: Tells a robot how close an object is

● Bumpers: Tells the robot it has collided with something

● Pressure sensors: Tells a robot that it is touching something


• The micro:bit itself or any other physical devices are
considered hardware.

• In order to make use of hardware, software (otherwise known


as “code” or computer program) is essential.

• The software ‘tells’ the hardware what to do.

• The first step in creating a computer program is to create a list


of instructions that need to be carried out to complete a desired
task.

• This is called an algorithm.


1. Think about a plan or a set of instructions, like a map or a
recipe.

2. What are they for?

3. Why do you use them in your everyday life?

4. How do these plans or instructions help you in your daily life?


Parts of a robot
What is a Micro:bit?
• Micro:bit is a small computer which takes input, processes the
input, and produces output.

• Open the browser and go to https://makecode.microbit.org.

Microsoft Makecode
Microsoft Makecode Interface
Micro:bit Connected to the Computer to download the program
What is Arduino?
• Arduino is similar to Micro:bit so it can be programmed to
take input, process the information and produce output to
interact with the real world.

Arduino Nano and Robot Car


• The micro:bit itself or any other physical devices are
considered hardware.

• In order to make use of hardware, software (otherwise known


as “code” or computer program) is essential.

• The software ‘tells’ the hardware what to do.

• The first step in creating a computer program is to create a list


of instructions that need to be carried out to complete a desired
task.

• This is called an algorithm.


• In coding, algorithms contain steps to tackle a problem.
• Algorithms are not written in code. Instead, they are planned and
written in a simple language humans can understand during the
planning stage of program development.
What is Algorithm?
• Algorithm is a plan or a series of step-by-step instructions for
the computer to solve a problem or perform a task.

• It can guide through the tasks whether it is big or small.

Think about making breakfast!


you will follow a series of steps
in a recipe to fry an egg.
Sequence
• A sequence is a list of steps or instructions that are carried out
one after the other, in the order they are written.

• Each step is performed sequentially to achieve a particular task


or solve a problem.
1. Sensors - A robot has sensors that act like the eyes and ears of
humans. They scan the environments with the use of special
sensors.

2. Controller - It can be assumed as the brain of a robot and do the


tasks as programmed.

3. Actuators- Actuators are the same as the human muscles which


can help the other parts of robots to do movements.
• Bug- Error or mistakes

71
What is a Syntax Error?
• A syntax error happens when the computer doesn't understand
the code because of typing something incorrectly.

• It's like making a spelling mistake in English.


What is a Logic Error?
• A logic error happens when the code runs without errors, but it
doesn’t do what you expected.

• It’s like telling a robot to walk forward, but it keeps turning in


circles.
Debugging – finding and removing errors.

74
Repetition or Iteration
• Repetition in coding gives the computer the command to
repeat a specific task or set of instructions a certain number of
times or until a particular condition is met.

• It's also known as a loop.

• This is a way to tell a computer to repeat an action without


writing the same code several times.
Counter loop Conditional loop

Forever loop
Conditional Statements
• A conditional statement in coding helps the robot or computer
to make a decision.
• It allows them to do different things based on whether a
certain condition is true or false.
➔ If the logical test is true, the computer does one thing.
➔ If the logical test is false, the computer does nothing or
another thing.
Conditional in a Flowchart

Conditional Statement Example


Real life examples
• If I’m hungry then I’ll eat cookies.
• If it rains then stay home.
• If you feel sleepy then sleep.
• If I have 500$ then I’ll buy snacks.
• If you have homework then do it.

• If I’m hungry, then I’ll eat cookies, else I’ll drink water.
• If it rains, then stay home, else go outside.
• If you feel sleepy, then sleep, else read books.
• If I have 500$, then I’ll buy clothes, else I’ll buy snacks.
• If you have homework, then do it, else watch movie.
Variables
• In coding, variables are considered as a placeholder for a value
that can be manipulated.

• Programmers create the variables to hold the value that will


change during the running of a program.

• For example, when you play a game, your score at the


beginning of the game is 0.

• The score changes as you play the game.


Fig- A variable named ‘age’ has a value of 10.
Heart animation
Circle and square
Testing light and sound sensor
• Light sensor measures the light level and the value is showed
when you press button A.
• Sound sensor measures the sound level and the value is
showed when you press logo.
Touch logo
Making a dice
• When you shake the microbit controller, it will show random
number.
Birthday Song
Showing Direction using Compass
• Microbit will show N, E,S,W depending on compass heading
values.
Automatic Lighting System
• If the light level is low, led will be turned on since it is night.
Walk a square
• The sprite will walk like it is drawing a square.
Adding Machine
By pressing button A and button B, you can change number1 and
number2 value. When you press button A+B, it will show the
result.
Counter by pressing button A
The counter value can be changed whenever you press button A.
Counter by pressing button A (Need to press only one time)

The counter value can be changed as soon as you press button A.


Counter by pressing button A (Need to press only one time)

The counter value can be changed to the specified value as soon


as you press button A. when it reaches that value, it will show
“Happy New Year”.
Reaction Game
The sprite will go left and right. The player have to catch the
sprite at x=2 by pressing button A. If he can, the score will
increase. When the score is 10, it will show “You are winner”.
Tinkercad

https://www.tinkercad.com/
Turning on/of LED
Turning on/of LED with slideswitch
Traffic Light in Tinkercad

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy