Starting with the code provided in log_spiral_login.py, add turtle commands into the main function in the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Starting with the code provided in log_spiral_login.py, add turtle commands into the main function in the program to draw the logarithmic spiral shown below. In Cartesian coordinates, the spiral's path is given by T = ae* cos(6) and =ae sin(0) y ae where a = 4, b = 0.22, and increases from 0. Note that in these equations, is in radians, and that the sin and cos functions in Python expect their argument to be in radians. It may be helpful to convert from degrees to radians using T Oradians = Odegrees * 180 or by using the radians function from the standard library's math module. Save your pro- gram as log_spiral_login.py, where login is your Purdue login. Then submit it along with a screenshot showing your drawing. Figure 1: Logarithmic spiral pattern for Exercise 06.4. ""Import additional modules below this line (starting with unit 6)." from turtle import * """Write new functions below this line (starting with unit 4)."" def start(): """This function initializes the window and the turtle. Do not modify this function or any of the properties it sets. www setup (564, 564) width (5) def main (): """Write your mainline logic below this line (then delete this line)." """Do not change anything below this line.""" if name == "___main__": start() www main () done () www Starting with the code provided in log_spiral_login.py, add turtle commands into the main function in the program to draw the logarithmic spiral shown below. In Cartesian coordinates, the spiral's path is given by T = ae* cos(6) and =ae sin(0) y ae where a = 4, b = 0.22, and increases from 0. Note that in these equations, is in radians, and that the sin and cos functions in Python expect their argument to be in radians. It may be helpful to convert from degrees to radians using T Oradians = Odegrees * 180 or by using the radians function from the standard library's math module. Save your pro- gram as log_spiral_login.py, where login is your Purdue login. Then submit it along with a screenshot showing your drawing. Figure 1: Logarithmic spiral pattern for Exercise 06.4. ""Import additional modules below this line (starting with unit 6)." from turtle import * """Write new functions below this line (starting with unit 4)."" def start(): """This function initializes the window and the turtle. Do not modify this function or any of the properties it sets. www setup (564, 564) width (5) def main (): """Write your mainline logic below this line (then delete this line)." """Do not change anything below this line.""" if name == "___main__": start() www main () done () www
Expert Answer:
Answer rating: 100% (QA)
Step No 1 Program import turtle import math Import additional modules ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
In the context of data modeling, what role does the concept of cardinality play in defining relationships between entities, and how does it influence schema design ?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The temperature T in degrees Celsius at (x, y, z) is given by T = 10/(x2 + y2 + z2). where distances are in meters. A bee is flying away from the hot spot at the origin on a spiral path so that its...
-
In Exercises find a power series for the function, centered at c and determine the interval of convergence. f(x) 2 6 - x' C = -2
-
Air in a spring loaded piston/cylinder has a pressure that is linear with volume, P = A + BV. With an initial state of P = 150 kPa, V = 1 L and a final state of 800 kPa and volume 1.5 L it is similar...
-
38 If two persons are selected at random from 5 pairs of brothers and sisters, what is the probability that (i) they are brothers and sisters? (ii) among them one is a boy and another is a girl?
-
How do we use the requirement of design to define messages and methods?
-
As lawyers assembled closing documents for a refinancing of some of the outstanding debt of United States Lines (USL), a secretary working on Amendment No. 1 to the First Preferred Ship Mortgage...
-
A ticket is drawn from a bag of 9 tickets labelled 1 to 9 and a 10 -sided die with the numbers 1 to 10 on its faces is rolled. How many different ways can you draw a number that is not divisible by 5...
-
Suppose you are a bank lending officer at the Midtown National Bank considering a loan request from Miller Manufacturing company for $1.05 million. The firm currently has $1 million in equity and its...
-
Dr. Jordan Davis has hired your professional services to file her income tax return. Dr. Davis is a retired surgeon. Due to her failing eyesight, Jordan was required to retire from her occupation at...
-
Which statement is true? a) Although our economy was not performing well, college graduates from the class of 2012 received more job offers than any other graduating class in history. b) The economic...
-
Compared to our economic history between 1870 and 1945, our economic history since 1945 could be considered _____. a) much more stable b) about as stable c) much less stable
-
Each of the following was a major contributing factor to suburbanization except ______. a) low-interest federal loans b) a federal highway building program c) the pent-up demand for housing d) the...
-
Which statement is true? a) Twenty-five million Americans were officially unemployed in 1933. b) Our economy expanded steadily from 1933 to 1945. c) Once the Great Depression began in 1929, our...
-
During World War II most of the people who got jobs in defense plants were ______who had _________experience building planes, tanks, and warships. a) men, substantial b) men, no c) women, substantial...
-
intersection of the two balls. {3 || G - 3|| R} is a || -G || < R1 + Ra Q. a) PT the and D = non empty iff b) is the intersection of the two balls. is empty of R = 1/2 normed linear & = (1,0,0, 2/7/...
-
Open Text Corporation provides a suite of business information software products. Exhibit 10-9 contains Note 10 from the companys 2013 annual report detailing long-term debt. Required: a. Open Text...
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
Please answer the following questions regarding the taxability of Social Security: a. A 68-year-old taxpayer has $20,000 in Social Security income and $100,000 in tax-free municipal bond income. Does...
-
Skyler is covered by his company's health insurance plan. The health insurance costs his company $3,500 a year. During the year, Skyler is diagnosed with a serious illness and the health insurance...
-
The data file \(b r 2\) contains data on 1080 house sales in Baton Rouge, Louisiana, during July and August 2005. The variables are: PRICE (\\($)\), SQFT (total square feet), BEDROOMS (number), BATHS...
-
Explain how and why plots of least squares residuals can reveal heteroskedasticity.
-
How much of an incumbency advantage do winners in U.S. Senate elections enjoy? This issue is examined by Matias D. Cattaneo, Brigham R. Frandsen and Roco Titiunik (2015) "Randomization Inference in...
Study smarter with the SolutionInn App