What's wrong with this code?
ans = sprite.ask("How are you?)
There is a missing quotation mark:
ans = sprite.ask("How are you?")
What characters CANNOT be included in a variable's name?
Underscores, spaces
Would this code work?
orange.set_color(orange)
No. Colors need quotation marks around them:
orange.set_color("orange")
Will the apple turn all the way?
apple.turn_right(40)
apple.turn_right(170)
apple.turn_right(140)
No. the apple will be 10 degrees short of turning 360 degrees.
What's wrong with this code?
if var_1 = "rock":
thingamajig = codesters.Sprite("rock")
It's missing an equal sign:
if var_1 == "rock"
thingamajig = codesters.Sprite("rock")
Where does the variable name go?
_____ = codesters.Display(_____, _____, 150)
It is the first of the three values:
my_display = codesters.Display(my_var, -200, 150)
Where on the screen is the square?
sprite = codesters.Square(-200, 200, 50, "green")
In the top left corner.
What's wrong with this code?
dude.set_speed(6)
dude.turn-right(360)
dude.move_left(100)
There's a dash where there should be an underscore:
dude.turn_right(360)
What's wrong with this code?
sprite = codesters.Circle(17, 127, 43, 11)
The last number is in the color slot:
sprite = codesters.Circle(17, 127, 43, red)
How many times will the chicken spin all the way around?
for counter in range(8):
chicken.turn_right(100)
The chicken will turn all the way around just twice.
Which value is the height of the parallelogram?
pumpkin = codesters.Parallelogram(0, 0, 100, 50, 45, "blue")
The third value, 100.
Where is the sprite?
sprite.go_to(0, 0)
sprite.move_left(50)
sprite.move_up(60)
sprite.move_right(20)
sprite.move_down(40)
The sprite is at (20, 20).
What's wrong with this code?
sprite = codesters.sprite("person4")
The S in Sprite should be capitalized:
sprite = codesters.Sprite("person4")
What's wrong with this code?
ran_choice = random.randint(1, 14)
if ran_choice == "16"
16 is outside of the range from 1 to 14.
How long is the rectangle?
rect = codesters.Rectangle(25, -125, 25, 125, "red")
The rectangle is 25 units long.
If a programmer wanted to make a shape instantly jump to (20, 40), would this code do that?
goat.move_to(20, 40)
No. "move_to" is not a real command. The programmer would have to do:
goat.go_to(20, 40)