wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Quiz 🐍

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

What is a variable?

a)

Store integers

b)

Store strings

c)

Store data

d)

None of the above

2.

How do we create variables in python?

a)

Var ==1

b)

Var != 1

c)

Var = 1

d)

Var ;= 1

3.

Which of the following is not the correct syntax for a variable?

a)

0Var = 1

b)

/Var = 1

c)

Var = 1

d)

var09 = 1

4.

How do we print a statement in python?

a)

print_(x)

b)

print.x

c)

print.(x)

d)

print(x)

5.

What will be the output for the following program

x = 'apple'

print(x)

a)

X

b)

x

c)

print(X)

d)

apple

6.

In python turtle to make the turtle move forward which command is used?

a)

t.(forward)

b)

t.left

c)

t = forward

d)

t.forward()

7.

Which is the correct option from below

a)

import * turtle

b)

import turtle *

c)

import turtle

d)

IMPORT Turtle

8.

To draw a square, what is the preferred angle?

a)

120

b)

180

c)

90

d)

360

9.

The correct syntax for creating a turtle is

a)

Turtle = turtle

b)

house = tutle.Turtle()

c)

house = turtle-Turtle()

d)

house = turtle.Turtle()

10.

What does t.forward(40) do?

a)

Turns 40 degrees

b)

Turns left 40 degrees

c)

Turn 50 degrees to the right

d)

Moves 40 steps forward