stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Tracy Python Review Flashcards | StudBud
Explore
/
Tracy Python Review
Tracy Python Review
14 terms
·
StudBud Administration
·
383 plays
A #programming review of basic #Python concepts we learned using CodeHS and Tracy the Turtle
Flashcards
14 cards
F
Practice quiz
P
Host live
L
Questions
14
Answers
1
Where does Tracy always start, and what direction is she facing?
In the middle of the screen, facing right
At the bottom of the screen facing up
In the middle of the screen, facing up
At the top of the screen, facing left
2
Which of the following is NOT a reason to use comments in computer code?
Increase code readability
Inform someone of possible bug locations
Make your code longer
Leave funny notes for someone to find
3
Which of the following variable names follows all of the variable naming conventions?
side_length
SideLength
variable1
1st_side_length
4
Which of the following code segments correctly asks for and accepts user input?
radius = input(What is the radius?)
user_name = int(input("What is your name? "))
color_choice = ("Pick a color: ")
length = ("What is the length? ")
5
Which of the following function calls is using a parameter?
draw_square(50)
draw_bead("green")
side_length = 50
draw_square()
6
Which of the following circle commands could have drawn the figure below?
circle(80, 180, 3)
circle(80, 180, 6)
circle(80, 360, 4)
circle(80, 180, 4)
7
What type of shape will be drawn by the following command: circle(100, 360, 6)?
triangle
circle
square
hexagon
8
Which of the following correctly asks for and accepts a number from the user?
radius = int(input("Enter the radius: "))
radius = "Enter the radius: "
radius = input(Enter the radius)
radius = int("Enter the radius: ")
9
What is the starting value of
i
for the loop pictured below?
50
5
10
0
10
Where does Python start
i
for a loop (assuming we don't put a minimum value)?
0
1
11
Why do we use functions in our code?
Remove bugs from code
Make the code longer
Make the code shorter
Make the code easier to read
12
What must we always begin a function definition with?
Five spaces
A tab
The letters "def"
A colon
13
Which of the following commands will draw a quarter circle?
circle(80, 90, 4)
circle(80, 1/4)
circle(80, 90)
circle(4)
14
Which of the following best indicates a function that draws a square?
square()
Square
draw_square()
draw_square