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

  Define use of service-oriented architecture and why

Giving reasons for your answer, suggest two types of applications where you would not recommend the use of service-oriented architecture and why.

  Write a program will correct a program that has error

Write a C++ program will correct a C++ program that has errors in which operator, « or », it uses with cin and cout.

  How many control inputs would be necessary in mealy machine

How many control inputs would be necessary in a Mealy machine with 12 unconditional state transitions and 16 states?

  Design an algorithm that transposes a tri-diagonal matrix

Design an algorithm that transposes a tri-diagonal matrix using the storage scheme devised in the previous part of the exercise.

  Programming project comprises writing a program that

programming project involves writing a program that computes the average salary for a collection of employees of

  Patent strategy contributing to succes of technology venture

Describe the ways by which an effective patent strategy contributes to success of technology venture? Answer should include at least 300 words. Also include references.

  What are the five major project fundamentals

What are the five major project fundamentals? List the five criteria for systems project selection. What does COTS stand for?

  Discuss how divs used for page layout

Discuss how divs used for page layout. How can the new structural elements in HTML5 be used instead of divs, in some cases, for page layout?

  Write down a short assembly language module

Write down a short assembly language module

  Script that will repetitively ask user for a binary number

write a script that will repetitively ask the user for a binary number and return its decimal equivalent until an illegal number (one containing digits other than 0 or 1) is entered.

  What is difference between instructions movec and moves

Describe the breakpoint exception and explain how its implementation differs in the 68010 and the 68020/30 microprocessors.

  Describe how you would generate random numbers with m

Why would it be unwise to use? Describe how you would generate random numbers with m greater than the computer word size.

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