wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Grade 10 ICT Assessment Term 1 – November 2024

Total questions: 90

Worksheet time: 50mins

Name
Class
Date
1.

What is a program?

a)

A set of instructions that tell a computer what to do.

b)

A piece of hardware.

c)

A type of computer virus.

d)

A social media platform.

2.

What is one of the main tasks of a programmer?

a)

Write and post blogs

b)

Debug code to find and fix errors

c)

Create digital artwork

d)

Design hardware components

3.

What does an algorithm describe?

a)

The graphics of a program

b)

The steps in a program

c)

The user interface design

d)

The network configuration

4.

What is the first step a programmer takes before writing code?

a)

Test the program

b)

Write an algorithm

c)

Debug the program

d)

Compile the code

5.

Which of the following is NOT a duty of a programmer?

4 lines
6.

Which command is used to show words on the screen in Python?

a)

display

b)

echo

c)

print

d)

show

7.

What is the output of the following Python command: print('hi')?

a)

hi

b)

'hi'

c)

print('hi')

d)

None

8.

Which of the following is an integer calculation you can try in Python?

a)

6+2

b)

"hello "+" world"

c)

'4'+'5'

d)

None of the above

9.

What will the following Python commands output? answer = 3+3 print(answer)

a)

A) 33

b)

B) 6

c)

C) answer

d)

D) 3+3

10.

Which command is used to stop an infinite loop in Python running in the shell?

(a)  

11.

Which symbol is used in Python to check if two values are equal?

a)

A) >

b)

B) <

c)

C) ==

d)

D) !=

12.

What is the purpose of using comments in Python?

a)

To execute commands

b)

To store variables

c)

To provide explanations or notes about the code

d)

To display output to the player

13.

What command is used to ask the player to input a path number in Python?

a)

print()

b)

input()

c)

while()

d)

random.randint()

14.

What does the input function do in the Python Hunt game?

a)

Displays text on the screen

b)

Stores a random number

c)

Takes input from the player

d)

Ends the game loop

15.

What should you do first to start debugging in Python?

(a)  

16.

In the Catch the Bugs game, what library is imported to use the random number functions?

a)

Math

b)

Random

c)

Datetime

d)

OS

17.

Which of the following actions will cause a syntax error in the Python code?

a)

Adding a comment line with #

b)

Deleting a necessary equal sign (=)

c)

Using variables

d)

Running the code without saving

18.

What happens if you misspell a function name, like changing print to prin()?

a)

The code runs but ignores the line

b)

The code runs but with a warning

c)

The code throws an error

d)

The code automatically corrects the mistake

19.

How can you identify a comment in Python code?

a)

It starts with //

b)

It starts with #

c)

It starts with --

d)

It is enclosed in quotes

20.

What does the following code output? x = 5 if x > 10: print("Greater") else: print("Smaller")

a)

Greater

b)

Smaller

c)

Error

d)

None

21.

Which of the following correctly defines a string in Python?

a)

print('a string is text')

b)

print(it's a string)

c)

print('let's learn")

d)

print("he said, "wow"")

22.

Which variable assignment is correct in Python?

a)

name$('value')

b)

name='Student Name'

c)

name !=('student_name')

d)

name==('Student Name')

23.

Which variable names follow Python's naming conventions?

a)

!color=('red')

b)

2color=('red')

c)

_color=('red')

d)

None of the above

24.

What is the output of the following program? name = ('Student Name') print (name)

a)

A) name

b)

B) It will show an error.

c)

C) Student Name

d)

D) None of the above

25.

Which of the following is not the rule of naming variable?

a)

A variable name must be one word with no spaces.

b)

A variable name cannot be a Python keyword.

c)

A variable name can start with special characters like & and $.

d)

All of the above are the rules of naming Python variables.

26.

What is the purpose of the (print) function in the Pet Monster Rescue program?

a)

To create a variable

b)

To show text on the screen

c)

To ask a question

d)

To store a value

27.

Which code snippet would you use to create a variable named place with the value 'Pet Monster Rescue'?

a)

place = 'Pet Monster Rescue'

b)

place.input('Pet Monster Rescue')

c)

place('Pet Monster Rescue')

d)

place.print('Pet Monster Rescue')

28.

How do you include a variable value in the middle of a sentence?

a)

print('Welcome to', place)

b)

print('Welcome to ' place)

29.

Which code snippet correctly asks the user for their name and stores it in a variable?

a)

name = input('What is your name?')

b)

input('What is your name?') = name

c)

name = print('What is your name?')

d)

print('What is your name?') = name

30.

What is an algorithm in programming?

a)

A. A type of programming language

b)

B. A keyword used to trigger actions

c)

C. A description of what the program will do

d)

D. A method for organizing variables

31.

Which keyword is used to trigger an action when a statement is true in Python?

a)

else

b)

then

c)

if

d)

for

32.

What does the '==' operator do in Python?

a)

Assigns a value to a variable

b)

Checks if two values are equal

c)

Checks if two values are different

d)

Compares two values to see which is greater

33.

Which of the following is a logical operator used to check if two values are different in Python.

a)

==

b)

!=

34.

What is the purpose of a flowchart in programming?

a)

To write the actual code of the program

b)

To describe the visual appearance of the program

c)

To outline the logical flow of an algorithm

d)

To list the variables used in the program

35.

What variable is used to start and stop the search for a pet in the Pet Monster Rescue program?

a)

search

b)

pet

c)

find

d)

match

36.

Which Python keyword is used to create a loop that contains a list of questions?

a)

if

b)

else

c)

while

d)

for

37.

What does the != operator check for in Python?

a)

Equality

b)

Greater than

c)

Less than

d)

Inequality

38.

How can you stop a loop when a match is found in the Pet Monster Rescue program?

a)

Using continues

b)

Setting finds to False

c)

Using break

d)

Both B and C

39.

What type of value must be converted to an integer for the logic to work in the question about the number of eyes?

a)

horns

b)

body

c)

eyes

d)

arms

40.

How can you stop an infinite loop in the Python Shell?

a)

Press ALT + F4

b)

Press CTRL + C

c)

Press ESC

d)

Press SHIFT + S

41.

Which library is used to add a delay between loop iterations in Python?

a)

datetime

b)

random

c)

time

d)

sys

42.

How can you make the loop ask the player if they want to keep counting after every five numbers?

a)

Use a nested loop.

b)

Use a variable to count iterations and reset it.

c)

Use a function call.

d)

Use a break statement inside the loop.

43.

One of the most valued traits of a programmer is their curiosity. What does this mean?

a)

A programmer asks questions.

b)

A programmer tries new things and welcomes surprises.

c)

A programmer takes risks.

d)

All of the above

44.

A programmer keeps an open mind. This means that

a)

They may ask someone for help or research to learn more.

b)

They consider new ideas and are not quick to judge.

c)

They are not afraid to make mistakes.

d)

All of these

45.

Text such as a word, phrase, or sentence are called.

a)

Variables

b)

Strings

c)

Comments

d)

Integers

46.

Note to a programmer about the code.

a)

Variables

b)

Strings

c)

Integers

d)

Comments

47.

A stored value that can change.

a)

Variable

b)

String

c)

Integer

d)

Comment

48.

print(I can program) Find out missing punctuation.

a)

"

b)

Her

c)

'

d)

=

49.

Pick the correct code to display the output 10 on screen.

a)

print('5+5')

b)

print(5+5)

c)

print("6+4")

d)

all of these

50.

Pick the correct code to display the output (Hello Beth)

a)

name=('Beth') print('Hello', name)

b)

name=('Beth') print('Hello name')

c)

name=('Beth') print('Hello'+name)

51.

Identify correct python command to complete the line of code. name=________('What is your name?')

a)

Print

b)

While

c)

If

d)

Input

52.

Identify correct python command to complete the line of code. __________ ('I like to code.')

a)

Print

b)

While

c)

If

d)

Input

53.

Identify correct python command to complete the line of code. ________True:

a)

Print

b)

While

c)

If

d)

Input

54.

Identify correct python command to complete the line of code. ________answer=='yes':

a)

Print

b)

While

c)

If

d)

Input

55.

If the score is greater than 4, end the game. Choose the correct logical operator from given options.

a)

<

b)

<=

c)

==

d)

>

56.

if score _____ 4: print('game over') break

a)

==

b)

!=

c)

<

d)

>

57.

Complete the code to ask the person if they want to answer the questions again. print('We do not have a matching pet.') answer= ______ ('Do you want to answer the questions again? ')

a)

Input

b)

Print

c)

If

d)

==

58.

Complete the code to make decision in a program. print('We do not have a matching pet.') answer= print('Do you want to answer the questions again? ') if answer _____ '0':

a)

Else

b)

Print

c)

==

d)

Input

59.

A Python command that stops a loop.

a)

Exit

b)

Close

c)

Break

d)

library

60.

A collection of Python commands used to do actions.

a)

Exit

b)

Close

c)

Break

d)

library

61.

A loop that runs forever until a condition is met.

a)

While

b)

For

c)

Library

d)

Close

62.

A loop that runs a specific number of times.

a)

While

b)

For

c)

Library

d)

Close

63.

What does the Python code do? random.randint(1, 25)

a)

stop a loop from running

b)

loop a set of instructions 25 times

c)

pick a number between 1 and 25

d)

none of these

64.

What does the Python code do?

a)

fetch commands from a Python library

b)

select a number from a range

c)

pick from a list of choices

65.

What does the Python code do?

a)

change the answer from an integer into a string

b)

change the answer from a string into an integer

c)

print the number of students in the class

d)

none of these

66.

What will be the output of given code? for repeat in range(4): print('I can program.')

a)

Print I can program Print I can program

b)

Print I can program

c)

Print I can program Print I can program Print I can program Print I can program

d)

None of these

67.

Which variable shows the initial score of the game?

a)

score=0

b)

score=score+0

c)

score=score+1

d)

score=1

68.

Which line of code increases the score by one point:

a)

score=0

b)

score=score+1

c)

print('You correctly guessed', score, 'times.')

69.

A person who writes a program is called?

a)

Tester

b)

Debugger

c)

Programmer

d)

End user

70.

A number is also called a/an?

a)

Variable

b)

Integer

c)

String

d)

Function

71.

To find and fix the mistakes in the code is called?

a)

Designing

b)

Testing

c)

Ideate

d)

Debugging

72.

A set of instructions that repeat are part of

a)

Defined functions

b)

Inbuilt functions

c)

Loops

d)

Data types

73.

The purpose of using the command below is to:

4 lines
74.

The purpose of the code below is

a)

To Assign the value ‘pet monster rescue’ to the place variable

b)

Place and ‘pet monster rescue’ are equal.

c)

The characters in place and ‘pet monster rescue’ are equal.

d)

Place and ‘pet monster rescue’ are equal.

75.

Which of the following function is used to take input from user?

a)

Raw()

b)

Raw_input()

c)

Input_raw()

d)

Input()

76.

The mistake that we find while testing a program are called.

a)

Viruses

b)

Bugs

c)

Worms

d)

Trojan

77.

Which of the following trait is not required in a programmer?

a)

Analytical Reasoning

b)

Logical Thinking

c)

Creativity

d)

None of the above

78.

A programmer divides the program into chunks to?

a)

It makes the program more maintainable and testable.

b)

It reduces the compilation time.

c)

To produce smaller and more focused files.

d)

All of the above

79.

Who is programmer _____?

a)

(The answer is not provided in the image, so this is an open-ended question.)

b)

Bill Gates

c)

Ada Lovelace

d)

Linus Torvalds

80.

Makes a program.

a)

Makes a program.

b)

Test and Debug a program.

c)

Develops the design and structure of software.

d)

Manages the development of software.

81.

It is important to sequence the steps in a program accordingly because otherwise.

a)

It will not work properly.

b)

The computer won’t be able to follow the instruction.

c)

It will work properly.

d)

Option A and B

82.

The proper way of grouping the instruction in python is:

a)

Indent the blocks.

b)

Put them in same line.

c)

None of the above

d)

Option A and option B

83.

The line of code which is used to tell the program to get commands from random library is.

a)

Import time.

b)

Import random.

c)

Import speed.

d)

Import rand.

84.

This line of code will

a)

Picks an option from wrong list of choices.

b)

Picks an option from right list of choices.

c)

Lists responses to a correct guess.

d)

Both B and C

85.

What will be the output of the line of code.

a)

It will print great guess.

b)

It will show an error.

c)

It will assign great guess to a right variable.

86.

What does the given code shows if num_pick>number: print('Your guess is too high.') print (random.choice(wrong))

a)

If the number picked by user is greater than number, then it will print “your guess is too high” and print an option from wrong list of choices.

b)

If the number picked by user is greater than number, then it will print “your guess is too high” and print an option from right list of choices.

c)

If the number picked by user is less than number, then it will print “your guess is too high” and print an option from wrong list of choices.

d)

If the number picked by user is less than number, then it will print “your guess is too high” and print an option from right list of choices.

87.

What does the given code in image shows?

a)

If the number picked by user is greater than number, then it will print “your guess is too high” and print an option from wrong list of choices.

b)

If the number picked by user is greater than number, then it will print “your guess is too high” and print an option from right list of choices.

c)

If the number picked by user is less than number, then it will print “your guess is too high” and print an option from wrong list of choices.

d)

If the number picked by user is less than number, then it will print “your guess is too high” and print an option from right list of choices.

88.

The loops which are used to repeat a statement until a condition is met are?

a)

While Loop

b)

Do while Loop.

c)

For loop

d)

All the above

89.

What will be the output of given program?

a)

0,1,3,6,10,15,21,28,36,45

b)

1,3,6,10,15,21,28

c)

0,3,6,10,15,21,28,36,45

d)

All the above

90.

what will be the output of given program?

a)

A) [Output image: 1 john\n2 john\n3 john\n4 john\n5 john]

b)

B) [Output image: 1 john\n3 john\n5 john]