wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python 1

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

Which is an example of a function in python?

a)

def myFunction():

b)

myfunction()

c)

function myFunction = {}

2.

What is the expected output of this code?

a)

Error

b)

John Wick

c)

Wick John

d)

Wick , John

3.

An Arduino is a ______.

a)
microcontroller board
b)
a type of fruit
c)
a musical instrument
d)
a sports equipment
4.

Programming is __________.

a)
writing instructions for a computer to execute
b)
singing songs
c)
building houses
d)
cooking recipes
5.

What is a variable?

a)
A variable is a placeholder for a value that can change or vary during the execution of a program.
b)
A variable is a constant value assigned at the beginning of a program
c)
A variable is a type of function in programming
d)
A variable is a fixed value that never changes
6.

This an example of a _____.

a)

A loop

b)
JavaScript function
c)

Conditional Statement

d)
Python module
7.

This is an example of a ______.

a)

A loop

b)

If/Then

c)

code

8.

Which of the following is an example of a string data type in python?

a)

Suzie

b)

"I like cats!"

c)

int(input())

d)

print(num_one, num_two)

9.

Which operator is used to multiply numbers?

a)

#

b)

*

c)

x

d)

%

10.

Which operator can be used to compare two values?

a)

><

b)

<>

c)

==

d)

=

11.

How do you start writing an if statement in Python?

a)

if( x > y)

b)

if x >y:

c)

if x > y then:

12.

What is the output of the following code

a)

Salary: 12000 Salary: 8000

b)

Salary: 8000 Salary: 12000

c)

The program failed with errors