wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

short quiz 2 (functions)

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.
what is the importance of return command?
a)
makes the function repeats the code inside it
b)
makes the function produces an output
c)
does not do anything
2.
how can you make the function takes an input?
a)
i cant make a function takes inputs
b)
the inputs are written after the return command
c)
the inputs are written between the ( )
3.
what is the importance of global keyword
a)
it makes your code online so anyone can see it
b)
it allows you to use variables defined inside the function in your code (outside the function) normally
c)
it does not do anything
4.
a)

it prints 1, 2, 3, 4

b)

it gives an error

c)

it prints 1 repeated 4 times

d)

it prints number 4

5.
a)

4

b)

error

c)

[1,2,3,4]

d)

an empty list

6.
a)

error

b)

{1,2,3,4}

c)

[1,2,3,4]

d)

{1:1, 2:2, 3:3, 4:4}

7.
a)

error

b)

int

c)

list

d)

dict

8.
a)

the code will produce an error

b)

the code will say Hello ahmed

c)

the code will not print anything

9.

what do you want to use python for?

a)

Data analysis & AI

b)

Scientific research

c)

Web development

d)

others

10.

Draw something new