I'm using the following tutorial to learn Python: How to think like a computer scientist
I'm running the following code and I get an error:
from gasp import *
begin_graphics(800, 600, title="Catch", background=color.yellow)
set_speed(120)
ball_x = 10
ball_y = 300
ball = Circle((ball_x, ball_y), 10, filled=True)
dx = 4
dy = 1
while ball_x < 810:
ball_x += dx
ball_y += dy
move_to(ball, (ball_x, ball_y))
update_when('next_tick')
end_graphics()
I get the following error when Attempting to run the code:
Traceback (most recent call last):
File "C:/Documents and Settings/zodkoyj/Desktop/Python/pitch.py", line 6, in <module>
set_speed(120)
NameError: name 'set_speed' is not defined
From everything I can find it should be part of the GASP module, but it doesn't appear to be. In the example code located HERE all I need to import is GASP. Any suggestions on where I can find the set_speed definition? Any help would be appreciated.