all code HS codes unit 2 fully solved 2023
all code HS codes unit 2 fully solved 20232.1.4 stretched slinky circle(35) forward(40) circle(35) forward(40) circle(35) forward(40) circle(35) forward(40) circle(35) forward(40) 2.2.4 shorter dashed line penup() backward(200) pendown() forward(50) penup() forward(50) pendown() forward(50) penup() forward(50) pendown() forward(50) penup() forward(50) pendown() forward(50) penup() forward(50) 2.2.5 caterpillar circle(20) penup() forward(40) pendown() circle(20) penup() forward(40) pendown() circle(20) penup() forward(40) pendown() circle(20) penup() forward(40) pendown() circle(20) 2.3.5 rectangle forward(50) left(90) forward(100) left(90) forward(50) left(90) forward(100) left(90) 2.3.6 4 columns penup() left(90) forward(200) right(90) right(90) pendown() forward(400) penup() right(90) forward(100) pendown() right(90) forward(400) right(90) penup() forward(200) pendown() right(90) forward(400) 2.4.5 row of circles speed(0) penup() backward(200) pendown() forward(10) for i in range(20): circle(10) penup() forward(20) pendown() 2.4.6 4 columns 2.0 speed(0) for i in range(1): penup() backward(200) right(90) forward(100) left(90) forward(100) left(90) pendown() forward(400) right(90) penup() forward(400) left(90) penup() forward(100) left(90) pendown() forward(400) 2.5.5 hexagon speed(0) for i in range(6): forward(50) left(60) 2.5.6 x marks the spot speed(0) left(45) for i in range(4): forward(100) backward(100) left(90) 2.5.7 circle pyramid speed(0) penup() setposition(-100,-200) for i in range (3): pendown() circle(50) penup() forward(100) setposition(-50,-100) for i in range (2): pendown() circle(50) penup() forward(100) pendown() penup() setposition(0,0) pendown() circle(50) penup() forward(100) pendown() 2.6.4 circle pyramid with comments speed(0) """ this program will make a pyramid of circles """ penup() setposition(-100,-200) # bottom circle line for i in range (3): pendown() circle(50) penup() forward(100) setposition(-50,-100) #middle circle line for i in range(2): pendown() circle(50) penup() forward(100) #top circle setposition(0,0) pendown() circle(50) penup() forward(100) 2.8.4 beaded bracelet speed(0) """ there must be 36 beads, a radius of 10 pixles, and the braclet must have a diameter of 200. use a function and turn tracy 10 degrees after drawing and return to the middle of each bead. """ speed(0) def draw_beaded_braclet(): for i in range(36): penup() forward(100) pendown() circle(10) penup() backward(100) left(10) draw_beaded_braclet() 2.8.5 shape stack """ this code will draw a stack of four squars and four cirlces alternating from top to bottom """ speed(0) #this function will draw a squrae and then and then movs to the position to draw the circle def draw_square(): pendown() for i in range(4): forward(50) penup() left(90) forward(50) right(90) forward(25) #this function draws a circle and then moves to position to draw a square def draw_circle(): pendown() circle(25) penup() backward(25) left(90) forward(50) right(90) #tracy is to start position and then starts drawing circles and squares alternating penup() setposition(-25,-200) for i in range(4): draw_circle() draw_square() 2.9.5 four colored triangles speed(0) pensize(5) color("red") backward(100) forward(200) backward(200) left(45) for i in range(4): color("green") forward(50) right(90) color("blue") forward(50) 2.9.6 colorful bracelet speed(0) def draw_colored_braclet(): for i in range(12): penup() color("purple") forward(100) pendown() begin_fill() circle(10) end_fill() penup() backward(100) left(10) penup() color("blue") forward(100) pendown() begin_fill() circle(10) end_fill() penup() backward(100) left(10) penup() color("red") forward(100) pendown() begin_fill() circle(10) end_fill() penup() backward(100) left(10) draw_colored_braclet() 2.10.4 bubble wrap 2.0 """ This code will fill the canvas with light blue circles. Now add a function that will draw a white highlight on each bubble. """ speed(0) # This function will draw one row of 10 circles def draw_circle_row(): for i in range(10): pendown() begin_fill() color("light blue") circle(20) end_fill() penup() forward(40) # This function will move Tracy from end of row up to beginning of the row on top def move_up_a_row(): left(90) forward(40) right(90) backward(400) # Send Tracy to starting position in bottom left corner penup() setposition(-180,-200) # Call circle drawing function 10 times to fill ten rows for i in range(10): draw_circle_row() move_up_a_row() 2.10.5 sidewalk speed(0) def line_of_squares(): for i in range(8): pendown() right(45) circle(35,360,4) left(45) forward(50) penup() setposition(-200,150) line_of_squares() penup() setposition(-200,-200) line_of_squares() penup() setposition(200,-200) left(90) line_of_squares() penup() setposition(-150,-200) line_of_squares()
Written for
- Institution
- Code HS
- Course
- Code HS
Document information
- Uploaded on
- March 17, 2023
- Number of pages
- 16
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
all codehs codes unit 2 fully solved 2023
-
214 stretched slinky circle35 forward40 circle35 forward40 circle35 forward40 circle35 forward40 circle35 forward40
-
224 shorter dashed
Also available in package deal