Python Coding (turtle) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is python

A

Text-based program language, which means you will need to be typing specific commands into a window to get the computer to do what you want it to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to create a folder

A

Computer&raquo_space; Your H: Drive&raquo_space; Year 9&raquo_space; Computer Science

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is turtle

A

Allows convenient drawings of lines and shapes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the first thing you type in to import the graphic window which we use to draw into?

A

import turtle

wn = turtle.Screen()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do you type in to change the background colour and to add a title on the window?

A

wn. bgcolor(“lightgreen”)

wn. title(“Turtle Power”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What to type to choose a colour of the turtle, and the pensize(the thickness of the line)?

A
tess = turtle.Turtle()
tess.color("hotpink")
tess.pensize(5)
tess.shape("turtle")
We have to call our turtle a name in this we call it ‘tess’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which command will display the text ‘Hello world!’ on the screen?

A

print(“Hello world!”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command will correctly ask the user for their age?

A

age = input(“How old are you?”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What function will convert a number to a string?

A

str()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the result of this command? print (“5” + “3”)

A

53

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which function will convert a string containing only digits into a number?

A

int()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which decision statement will be triggered if the variable x is less than 20

A

if x < 20:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly