Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

untitled

Total questions: 25

Worksheet time: 19mins

Name
Class
Date
1.
What does forward(300) do?
a)
Moves in the direction it is facing 300 steps
b)
Moves down the screen 300 steps
c)
Moves up the screen 300 steps
2.

What is the keyword needed to repeat code (iterate) in Python?

a)

for

b)

if

c)

input

d)

print

3.

To fill the shape with the colour red (using a different colour outline), which command is best?

a)

color("red")

b)

fillcolor("red")

c)

fill("red")

d)

fillcolour("red")

4.

In order to move the turtle 120 forward without drawing on the screen, which order is correct?

a)

forward(120)

penup()

pendown()

b)

pendown()

forward(120)

penup()

c)

penup()

forward(120)

pendown()

5.

What software do you use to write a program in Python?

a)

Word

b)

IDLE

c)

Powerpoint

d)

Excel

6.

What shape will this create?

a)

Triangle

b)

Hexagon

c)

Rectangle

d)

Will look like the turtle is climbing stairs

7.

Look at this code, how many times will it loop?

a)

50

b)

90

c)

0

d)

4

8.

What keyword is used to define a function / subprogram in Python?

a)

def

b)

if

c)

while

d)

for

9.

How do you tell python you want to use the turtle library

a)

turtle import

b)

import turtle

c)

from libraries import turtle

d)

from turtle import libraries

10.
Moves the turtle backward by the specified amount
a)
backward()
b)
goto()
c)
left()
d)
fillcolor()
11.

There is an error on this piece of code, what is the correct statement?

a)

import turtle

b)

import Turtle

c)

import.Turtle

d)

turtle import

12.

There is an error on this piece of code, what is the correct statement?

a)

turtle.forward(150)

b)

turtle.forward()

c)

turtle.moveforward()

d)

turtle.move.forward(150)

13.

"hello"

a)

String

b)

Integer

c)

Float

d)

Word

14.

45

a)

String

b)

Integer

c)

Float

d)

Number

15.

56.867

a)

String

b)

Integer

c)

Float

d)

Decimal

16.

What will be the output?

var1=['sam', "Pam", 12,44]

var1[3]="Ram"

print(var1)

a)

['sam', 'Pam', 12, 44]

b)

['sam', 'Pam', 12, 'Ram']

c)

It will give an error

d)

['sam', 'Pam', 'Ram',44]

17.

What will be the output?

list1=["Red","Green","Blue","Yellow"]

list1.append("Black")

print(list1)

a)

<class 'list'>

b)

['Red', 'Green', 'Blue', 'Yellow', 'Black']

c)

['Black','Red', 'Green', 'Blue', 'Yellow' ]

d)

AttributeError: 'tuple' object has no attribute 'append'

18.
What is the position of the name "Robert" in the following list:
a)
0
b)
1
c)
2
d)
3
19.

Is this the correct code for a list?

register = {"Sam", "Pheobe", Georgia", Richard"}

a)

Yes

b)

No

20.

Which symbols are used to open and close a list?

a)

( ) round brackets

b)

( ) curly brackets

c)

[ ] square brackets

d)

" " speech marks

21.

This list contains items of what data type?

a)

String

b)

Boolean

c)

Float

d)

Integer

22.

Choose all of the following which are built in data types in Python

a)

dict

b)

list

c)

set

d)

tuple

23.

Comparing a dictionary to Python to a dictionary for words, ____________ is each word we look up_______ is definition of the word

a)

value, key

b)

key, attribute

c)

method, value

d)

key, value

24.

Dictionaries use _________ and keys are separated with _________

a)

[], :

b)

{}, ()

c)

(), :

d)

{}, :

25.

A Python dictionary is called

a)

pytn

b)

dict

c)

dicn

d)

def