NEW
Font size
WorksheetsIntroduction to Coding
Total questions: 60
Worksheet time: 30mins
What is the purpose of coding?
To play games
To create instructions that computers can understand
To design websites
To save files
Which of the following best describes an algorithm?
A program on the computer
A set of steps to complete a task
A coding language
A type of data
What is a flowchart used for in coding?
To draw pictures
To represent an algorithm visually
To play sounds
To write stories
Why is it useful to write an algorithm before starting to code?
To make coding easier by organizing steps
To make the code more confusing
To make it look impressive
To change the language of coding
Identify the error in this algorithm for calculating 10 x 3 on a calculator: Step 1: Enter 10 Step 2: Press the + button Step 3: Enter 3 Step 4: Press =
Step 1
Step 2
Step 3
Step 4
What should you do if your code is not working correctly?
Check for mistakes and fix them (debugging)
Delete the code
Write a new code without checking
Ignore the errors
While debugging, you realize the calculator code shows "multiplication" instead of "addition." What's the most likely cause?
The formula or symbol is incorrect
The calculator is broken
You need to restart the calculator
You need to reinstall the calculator program
What should you do if you find a mistake in your algorithm?
Correct the steps clearly and logically
Skip that part and continue
Ask someone else to complete it
Start coding without fixing it
In a flowchart for brushing your teeth, which step is a decision?
Pick up the toothbrush
Check if the toothbrush is wet
Rinse with water
Add toothpaste
What could happen if you don't debug your code?
The code will run perfectly
The code may show errors or not work at all
It will run faster
The code will look different
What is the purpose of a flowchart that compares two numbers?
To multiply two numbers
To determine which number is larger
To find the sum of the numbers
To check if they are even or odd
If a flowchart compares A = 7 and B = 10, what is the output?
"A is greater"
"B is greater"
"Both are equal"
"Enter a new number"
In a flowchart comparison, if A is less than B, what result should be shown?
"A is greater"
"B is greater"
"Values are equal"
"Process complete"
What is an algorithm in computer science?
A computer program
A language to create codes
Step-by-step instructions to solve a problem
A type of error in a code
What is a bug in a program?
An error in the code
A small picture
A programming language
A new software update
What does debugging mean?
Removing errors from code
Adding new code
Running the code continuously
Ignoring errors
What does a flowchart represent in programming?
A type of coding language
A set of pictures
A diagram to represent an algorithm
A symbol library
Which flowchart symbol would you use for "Enter age" in a program?
Oval
Parallelogram
Rectangle
Diamond
What does a diamond shape represent in a flowchart?
Start or end
Input or output
Process
Decision
In a flowchart, what does a rectangle symbolize?
Start of the algorithm
An action or process
Input of data
End of the algorithm
What is a parallelogram used for in a flowchart?
To show input or output
To start a new algorithm
To end the flowchart
To show a decision
What are flow lines in a flowchart?
Symbols to show the start or end
Arrows that connect steps in a flowchart
Icons to display errors
Tools to add new shapes
In the flowchart for deciding if you need an umbrella, which step would involve a decision?
Check if it's raining or cloudy
Put on your shoes
Start your day
Wear a hat
A code isn't working because of an error. What should you do?
Check each line for mistakes
Start writing a new code
Ignore the code
Play with different outputs
If you have a decision box in a flowchart, what type of question should it represent?
One that has a yes or no answer
An open-ended question
A coding language
An image-based question
In a flowchart to represent baking a cake, which of these steps is a process?
Take out ingredients
Mix the ingredients
Set the temperature of the oven
End
If you are asked to write an algorithm for switching on a computer, what is the first step?
Open a new document
Press the power button
Start typing
Close all applications
You are designing a flowchart to show the steps of watering a plant. Which step comes first?
Check if the soil is dry
Fill the watering can
Water the plant
Put the can back
In a flowchart to represent making tea, what would the rectangle symbolize?
Boiling water
Deciding to add milk
Adding sugar and tea leaves
Pouring the tea
Your flowchart includes checking if two numbers are equal. What shape represents this step?
Rectangle
Parallelogram
Diamond
Ellipse
Why is it important to write an algorithm before starting to code?
To save time and avoid errors
To add more steps to the process
To make the code look better
To keep the code in a single line
What might happen if there's a bug in your algorithm?
The algorithm will run perfectly
The computer will crash
The code may not work as intended
It will increase processing speed
What does the word 'debugging' mean in coding?
Making the code longer
Correcting mistakes in code
Testing the code
Deleting a program
In coding, what would a bug most likely affect?
The performance of a program
The user's computer settings
The battery life of the device
The sound quality of a video
If a bug prevents a code from running, what should you do?
Write new code immediately
Find and fix the bug (debugging)
Restart the program repeatedly
Ignore the bug and run the code
What's the benefit of using a decision box in a flowchart?
It shows actions
It allows the user to make choices in the algorithm
It starts the code
It indicates the end of the program
What happens if you skip debugging in a code?
The program will always work perfectly
You may not identify errors
The code will be shorter
The code will work only once
In an algorithm for brushing teeth, which step would be a decision?
Is the toothbrush wet?
Get toothpaste
Start brushing
Spit out water
If a flowchart has no 'End' symbol, what might happen?
The flowchart may be confusing
It will improve code quality
It will make the code faster
The flowchart will look clearer
What symbol in a flowchart shows the 'Start' of a process?
Diamond
Circle
Oval
Parallelogram
In an algorithm to prepare a drink, what would be an input step?
Enter the amount of water
Pour the drink into a glass
Serve the drink
Start drinking
What's the purpose of an 'End' symbol in a flowchart?
It signals the start of the flowchart
It indicates a decision step
It marks the conclusion of the process
It shows where to add comments
In a cooking flowchart, what would a diamond-shaped box be used for?
Measure ingredients
Check if the oven is preheated
Start cooking
Add ingredients to the bowl
For the flowchart of turning on a computer, which step would be the last one?
Press the power button on the CPU
Start using the computer
Check if the monitor is on
Plug in all cables
When planning a code, why is a flowchart used first?
To avoid making mistakes while coding
To make the code more colorful
To add complex designs
To prevent others from understanding the code
You are asked to write an algorithm for solving a math problem. Which is the correct sequence to solve 5 + 3?
Step 1: Enter 5, Step 2: Press +, Step 3: Enter 3, Step 4: Press =
Step 1: Enter 3, Step 2: Press -, Step 3: Enter 5, Step 4: Press =
Step 1: Enter 5, Step 2: Enter 3, Step 3: Press *
Step 1: Enter 3, Step 2: Press =, Step 3: Enter 5
What is the purpose of this flowchart?
To compare age
To check if someone is a teenager
To check if age is above or equal to 18
To find out the maximum age
If the input age is 20, what will the flowchart display?
"Underage"
"Adult"
"Senior"
"Child"
What will the flowchart display if the input age is 16?
"Adult"
"Not an adult"
"Senior citizen"
"Teenager"
What is the purpose of this flowchart?
To check if a number is even or odd
To compare a number with 20
To add two numbers
To multiply a number by 5
If the input value is 25, what will the flowchart display?
"Not greater than 20"
"The number is 20"
"Greater than 20"
"No result"
What will the flowchart display if the input value is 15?
"Greater than 20"
"Not greater than 20"
"The number is 20"
"The number is negative"
What is the purpose of this flowchart?
To determine if a student passes based on score
To add two numbers
To find out the number of students
To multiply two numbers
If the input score is 75, what will the flowchart display?
"Fail"
"Pass"
"Try again"
"Not a score"
What will the flowchart display if the input score is 40?
"Pass"
"Needs improvement"
"Fail"
"Try Again"
If you wanted to create a flowchart to make a peanut butter sandwich, which of these would be the first step?
Apply peanut butter to bread
Place the sandwich on a plate
Get bread and peanut butter
Start eating
In a flowchart, what would be the next step after “Enter password” if you are creating a login process?
End
Show main page
Display error message
Check if the password is correct
In Scratch, why would you use the “debug” option?
To delete a project
To make the code run slower
To add new symbols
To fix errors in the code
Why might an algorithm need to be rewritten?
To correct mistakes or improve logic
To add random steps
To make it longer
To match another code
In a flowchart for cooking pasta, what shape would you use to show boiling water?
Parallelogram
Rectangle
Oval
Diamond
