2 is an example of this data type.
What is integer?
What is a loop in programming?
A loop is a structure that repeats a section of code.
Why is it important to name variables with descriptive names?
Helps us understand what the program is doing... less bugs..
Write a line of code that draws a circle with a radius of 20.
t.circle(20)
2 cats :)
3.2 is an example of this data type.
What is a float?
What are the two types of loops?
For and while loops
A value or "box" that stores information.
Write a line of code that draws a triangle.
t.circle(20, 360, 3)
Who are the two main protagonists of The Lord of The Rings?
Frodo Baggins and Samwise Gamgee
"5" is an example of this data type.
What is a string?
How many times does this loop run?
for x in range(5):
t.circle(40)
t.forward(20)
5 times.
Write an example of a variable in Python syntax.
color = red
Write a line of code that draws a hexagon.
t.circle(50, 360, 5)
What is the "NPC" abbreviation short for to a video gamer?
Non-Playable Character
True is an example of this data type.
What is a Boolean?
What is the difference between while and for loops?
Ask a user for their age, with a variable to store that information.
age = int(input("how old are you?")
Write a line of code that draws an octagon.
t.circle(60, 360, 8)
How do you calculate the atomic mass of an element?
Add the protons and neutrons.
1 or 0 is an example of...(3 answers)
Integer / Boolean / Binary
Write an algorithm that draws a star using a for loop.
for line in range(5):
t.forward(30)
t.right(144)
What is it called when we use "int" when asking a user for a number alongside a string?
This is called casting. It changes the string to an integer automatically.
With your group, write an algorithm that draws two circles 50 pixels away from each other.
import turtle
t = trtl.Turtle()
t.circle(20)
t.penup()
t.goto(50, 0)
t.pendown()
t.circle(20)
Which planet is the hottest in our solar system?
Venus