50 likes | 141 Views
Chapter 4: Interface Design. Directed Reading Notes and Demos CS1 Kamiakin HS. 4.1 TurtleWorld. from swampy.TurtleWorld import * world = TurtleWorld () bob = Turtle() print bob wait_for_user () . 4.1 Right Angle. from swampy.TurtleWorld import * world = TurtleWorld ()
E N D
Chapter 4: Interface Design Directed Reading Notes and Demos CS1 Kamiakin HS
4.1 TurtleWorld from swampy.TurtleWorld import * world = TurtleWorld() bob = Turtle() print bob wait_for_user()
4.1 Right Angle from swampy.TurtleWorld import * world = TurtleWorld() bob = Turtle() print bob fd(bob, 100) lt(bob) fd(bob, 100) wait_for_user()
4.1 Square from swampy.TurtleWorld import * world = TurtleWorld() bob = Turtle() print bob fd(bob, 100) lt(bob) fd(bob, 100) lt(bob) fd(bob, 100) lt(bob) fd(bob,100) wait_for_user()
from TurtleWorld import * world = TurtleWorld() bob = Turtle() print bob def square(t): for i in range(4): fd(t, 100) lt(t) square(bob) wait_for_user()