The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
USING PYTHON AN TURTLE
11-Write a function named regularPoly that draws a regular polygon(all sides equal and all angles equal) using three paramers. 1-t a turtle that is used for drawing 2-sideLen the length of a side of the regular polygon and 3- numsides the number of sides of the regular polygon.When the function regularPoly returns t should be in its initial position an orientation. do not make any assumptions about the initial position and orientation of t. hint:while drawing the polygon. the turtle must turn a total of exactly 360 degrees.
11b- Write code that performs the following operations
1-import turtle
2-create a screen and a turtle
3-repeatedly call the function regularPoly to draw a series of regular polygons that share a starting vertex.the first polygon should be a triangle a the last one an octagon(use a loop for full credit)
Â
12-Write a function named midLine that draws a line based on two paramters
1-t a turtle to use to draw
2-length the length of the line to draw
the turtle is initially at the midpoint of the line that midline draws when midline returns t should be in its initial position and orientation. do not make any assumptions about the initial position and orientation of t.
12b-write a function named starburst that uses turtle graphics to draw a number of lines of increasing length that share a common midpoint. each line is the offset of the previous line by specified angle , the function takes 5 parameters
1- t a turtle for drawing
2- num the umber of lines to draw
3-init the length of the first line
4-delta the multiple by which the successive lines increase in lenght
5- angle the counterclockwise roation between successive lines.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly