Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need my Python 3 code to look like the below picture. I have most of the program done, I just need help getting the

I need my Python 3 code to look like the below picture. I have most of the program done, I just need help getting the diagram to look like the picture below. Thanks.

image text in transcribed

import turtle wn = turtle.Screen() def draw_u(t, posx, posy, color): u = turtle.Turtle() u.color(color) u.penup() u.setposition(posx, posy) u.begin_fill() u.pendown() u.forward(60) u.right(90) u.forward(20) u.right(90) u.forward(60) u.right(90) u.forward(20) u.end_fill() u.penup() u.back(20) u.right(90) u.forward(20) u.begin_fill() u.pendown() u.forward(20) u.right(90) u.forward(60) u.right(90) u.forward(20) u.right(90) u.forward(60) u.end_fill() u.penup() u.right(90) u.forward(20) u.right(90) u.forward(60) u.right(90) u.forward(20) u.left(140) u.begin_fill() u.pendown() u.forward(30) u.left(40) u.forward(60) u.left(40) u.forward(30) u.left(140) u.forward(80) u.end_fill() u.penup() u.back(60) u.right(90) u.begin_fill() u.pendown() u.forward(60) u.right(90) u.forward(20) u.right(90) u.forward(60) u.right(90) u.forward(20) u.end_fill() u.penup() u.right(90) u.forward(60) u.left(90) u.begin_fill() u.pendown() u.forward(20) u.right(90) u.forward(20) u.right(90) u.forward(60) u.right(90) u.forward(20) u.right(90) u.forward(40) u.end_fill() u.right(90) u.penup() u.setposition(posx, posy) u.pendown() def draw_h(t, posx, posy, color): t = turtle.Turtle() t.color(color) t.penup() t.setposition(posx, posy) t.forward(50) t.right(90) t.forward(50) t.right(90) t.right(90) t.right(90) t.begin_fill() t.pendown() t.forward(60) t.left(90) t.forward(20) t.left(90) t.forward(60) t.left(90) t.forward(20) t.end_fill() t.penup() t.left(90) t.forward(20) t.begin_fill() t.pendown() t.forward(20) t.right(90) t.forward(60) t.right(90) t.forward(20) t.right(90) t.forward(60) t.end_fill() t.penup() t.right(90) t.forward(20) t.right(90) t.forward(60) t.right(90) t.forward(20) t.begin_fill() t.pendown() t.forward(20) t.left(90) t.forward(20) t.left(90) t.forward(60) t.left(90) t.forward(20) t.left(90) t.forward(60) t.end_fill() t.penup() t.back(40) t.right(90) t.forward(20) t.begin_fill() t.pendown() t.forward(20) t.right(90) t.forward(60) t.right(90) t.forward(20) t.right(90) t.forward(60) t.end_fill() t.penup() t.back(60) t.right(90) t.begin_fill() t.pendown() t.forward(40) t.right(90) t.forward(20) t.right(90) t.forward(60) t.right(90) t.forward(20) t.right(90) t.forward(20) t.end_fill() t.penup() t.back(20) t.left(90) t.begin_fill() t.pendown() t.forward(20) t.left(90) t.forward(20) t.left(90) t.forward(60) t.left(90) t.forward(20) t.left(90) t.forward(20) t.end_fill() t.penup() t.right(90) t.forward(60) t.left(90) t.forward(20) t.begin_fill() t.pendown() t.forward(20) t.right(90) t.forward(20) t.right(90) t.forward(60) t.right(90) t.forward(20) t.right(90) t.forward(20) t.end_fill() t.right(90) t.penup() t.setposition(posx, posy) t.pendown() def draw_Grid(t, ox, oy, rows, cols): t.ht() pathwidth, pathheight = 200, 150 for i in range(cols): posx = ox + pathwidth * i for j in range(rows): posy = oy + pathheight * j draw_u(t, posx, posy, 'black') draw_h(t, posx, posy, 'black') turtle.setup(800, 600) width, height = turtle.window_width(), turtle.window_height() t = turtle.Turtle() t.speed(6) t.ht() draw_Grid(t, 10-width//2, 230-height//2, 3, 4) turtle.done()

???? ??? ???? Transcribed image text

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

=+12. That is either a mistake or was an intentional omission.

Answered: 1 week ago