Font size
WorksheetsComputational Thinking Unit
Total questions: 29
Worksheet time: 16mins
Which of the following is not done by abstraction?
Identifies essential details
Disregards non-essential information
Breaks the problem down into smaller tasks
Which of the following is not done by decomposition?
Allows multiple people to work on the problem together
Disregards non-essential information
Breaks the problem down into smaller tasks
When drawing a dog, which of the following characteristics is non-essential?
Dogs have 4 paws
Dogs have fur
Dogs have brown fur
Identifying the steps involved in solving a problem
Abstraction
Decomposition
Pattern Recognition
Algorithmic Thinking
What error is is shown on this flowchart?
Incorrect exit from 'Is employee exempt' decision
No end terminator
No direction arrows
Cannot have multiple entry points to an 'End' terminator
Incorrect decision shape
What error is is shown on this flowchart?
Incorrect exit from 'Is employee exempt' decision
No end terminator
No direction arrows
Cannot have multiple entry points to an 'End' terminator
Incorrect terminator shape
An error in the rules of the language is known as:
Major error
Syntax error
Run Time error
Logic error
_______________ occurs when a variable is used before it is declared (assigned a value) or unknown command.
Name error
Type error
Logic error
Syntax error
______________ is used to display output to the user.
#
Float
print ()
varName =
How will the following code look on the screen?
print ("I love programming.")
print ("I love programming.")
"I love programming."
"I love programming."
I love programming.
I love programming.
I love programming. I love programming.
I LOVE PROGRAMMING
I LOVE PROGRAMMING
What is the output of the following code?
x = 5
y = 3
print(x + y)
8
2
15
7
What is a variable in Python?
A variable in Python is a mathematical operation.
A variable in Python is a type of function.
A variable in Python is a reserved memory location to store values.
A variable in Python is a type of snake.
How do you declare a variable in Python?
variable_name = value
variable_name : value
variable_name = value =
value = variable_name
How do you add comments in Python code?
Use the '#' symbol to add comments in Python code.
Use the '/* */' symbols to add comments in Python code.
Use the '//' symbol to add comments in Java code.
Use the '//' symbol to add comments in Python code.
Explain the concept of 'nested loops' in Python.
Nested loops in Python involve one loop inside another loop, allowing for more complex iteration patterns.
Nested loops in Python involve loops that are not related to each other
Nested loops in Python involve loops that run sequentially
Nested loops in Python involve loops that cannot be used together
Example of valid identifiers
12Name
name$
total-mark
total_marks
Choose the INVALID identifiers from the following
NUmbEr1
1NUMBer
A_B
A&B
To display the following on screen Hello World! the following command should be used:
print(Hello World!)
print("Hello World" + !)
print("Hello World!")
print"(Hello World!)"
What is a string in Python?
A letter, number, word, or sentence in quotation marks
A mathematical operation
A conditional statement
A data type
Choose all the recognised control structures in a computer program ...
Sequence
Selection
Iteration
Duplication
An error in the way a program works where program can run but does not do what it is expected to do is called a ...
Logic error
Syntax error
Runtime error
Catastrophe
Identify the arithmetic operator which is used to calculate exponential.
*
%
!
**
A software application that provides comprehensive facilities to computer programmers for software development.
BASH
compiler
IDE (Integrated Development Environment)
cloud computing
Which of the following is incorrect variable name in Python?
variable_1
variable1
1variable
_variable
