Write a function that draws a regular polygon

Assignment Help Computer Engineering
Reference no: EM132174797

USING PYTHON AN TURTLE

a-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.

b- 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)

Reference no: EM132174797

Questions Cloud

Monohybrid cross in terms of punnet squares : Whats the difference between a Dihybrid and a Monohybrid cross in terms of punnet squares? (In a Biological sense)
Write your own algorithm for computing square roots : Develop and write your own algorithm for computing square roots. One way to approach this is by guessing and testing until a good approximation is found.
Offered exciting new job in brisbane provided : They had become close friends. Jennifer was offered an exciting new job in Brisbane provided that she can take up the position in seven days.
Distinguish between entrepreneurs of different types : A microfinance institution aims to break even. Its manager cannot distinguish between entrepreneurs of different types, but she knows that the population.
Write a function that draws a regular polygon : Write a function named regularPoly that draws a regular polygon(all sides equal and all angles equal) using three paramers.
Baseball club could raise against sue : Discuss what defences the council and the baseball club could raise against Sue?
Would you expect borrowers to take the risk : Moral hazard is a problem because poor borrowers lack collateral. If they had collateral, it could be taken away, providing a punishment to shirkers.
Brian have any action against thunder and antlers : Further does Brian have any action against Thunder and Antlers?
Draw a number of lines of increasing length : Write a function named starburst that uses turtle graphics to draw a number of lines of increasing length that share a common midpoint.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd