50 likes | 145 Views
Dive into Interface Design with TurtleWorld examples, exploring right angles and squares to enhance learning in CS1. Demonstrate the concepts with interactive demos from Kamiakin HS. Learn to code with hands-on practice and directed reading notes.
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()