wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Test 1: Banana Tales I

Total questions: 20

Worksheet time: 14mins

Name
Class
Date
1.

What is the programming language used in Banana Tales?

a)

JavaScript

b)

Python

c)

Java

d)

C++

2.

What does debugging in coding refer to?

a)

Identifying and resolving errors

b)

Testing the code

c)

Creating bugs intentionally

d)

Writing new code

3.

What does sequencing refer to in a computer program?

a)

Random execution of code

b)

Repeating the same code

c)

Executing code in a specific order

d)

Skipping code execution

4.

What is a list in Python?

a)

A sequence of items that can be accessed individually

b)

A data type

c)

A collection of numbers only

d)

A single item

5.

What does a method in Python represent?

a)

A block of code that performs a specific task

b)

A variable

c)

A loop

d)

All of the above

6.

What is an argument in coding?

a)

A data type

b)

A loop structure

c)

A variable name

d)

A value passed between programs

7.

What does a for loop in Python allow you to do?

a)

Execute code only once

b)

Repeat code for a specific number of times

c)

Skip code execution

d)

Execute code conditionally

8.

What is the purpose of a comment in Python?

a)

To execute code

b)

To provide explanations in the code

c)

To define variables

d)

To create loops

9.

What does the range() function do in Python?

a)

Generate a sequence of numbers

b)

Create a list

c)

Check for errors in the code

d)

Define variables

10.

What does the len() function do in Python?

a)

Find the length of a string

b)

Check for errors in the code

c)

Generate random numbers

d)

Create a list

11.

What does an if statement in Python allow you to do?

a)

Execute code unconditionally

b)

Repeat code for a specific number of times

c)

Execute code conditionally

d)

Skip code execution

12.

What does a while loop in Python do?

a)

Execute code conditionally

b)

Repeat code for a specific number of times

c)

Skip code execution

d)

Execute code only once

13.

What do Boolean Operators do in Python?

a)

Create loops

b)

Check for syntax errors

c)

Combine or manipulate boolean values

d)

Perform mathematical operations

14.

What is a function in Python?

a)

A data type

b)

A loop structure

c)

A variable

d)

A block of code that performs a specific task

15.

What is the purpose of the 'break' statement in Python?

a)

Terminate the current loop

b)

Execute code conditionally

c)

Repeat code for a specific number of times

d)

Skip code execution

16.

What is the difference between '==' and 'is' operators in Python?

a)

'==' compares values, 'is' compares memory addresses

b)

'==' compares memory addresses, 'is' compares values

c)

Both operators are used for mathematical operations

d)

Both operators are used for string concatenation

17.

What is the purpose of the 'continue' statement in Python?

a)

End the program execution

b)

Move to the next iteration of a loop

c)

Execute code conditionally

d)

Repeat code for a specific number of times

18.

What is the purpose of the 'pass' statement in Python?

a)

Terminate the program

b)

Do nothing and continue

c)

Print a message

d)

Execute code conditionally

19.

What is the difference between 'append()' and 'extend()' methods in Python lists?

a)

'append()' adds a single element, 'extend()' adds multiple elements

b)

'append()' adds multiple elements, 'extend()' adds a single element

c)

Both methods are used for mathematical operations

d)

Both methods are used for string concatenation

20.

What does the 'pop()' method do in Python lists?

a)

Inserts an element at a specific index

b)

Removes and returns the last element

c)

Sorts the list in ascending order

d)

Reverses the order of elements