Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function using the Python programming language that does the following: Create an array of angles from 0 to 2*pi in pi/3 increments. Create

Write a function using the Python programming language that does the following:

Create an array of angles from 0 to 2*pi in pi/3 increments.

Create two new arrays that hold the sines and cosines of this array of angles.

Plot the sine values as a function of the cosine values (i.e. plt.plot(cosines, sines)).

You are expected to observe a polygon.

Modify your polygon function so that the polygon is plotted in such a way that it standing on a point.

This can be done by adding an offset to each element of the array of angles. You should do this by exploiting Numpy syntax that allows you to perform operations over a whole array in a single command. Do not manually add an offset to each of the angles specified in the array.

What is the location of the point on which polygon is standing?

Enter your results as vector of two elements [X,Y] and do not add any extra spaces for example. [5,4]

Then modify your developed function in the previous question so that it takes the offset used above as an input argument (in degrees) to the function.Use this offset variable to control how your hexagon is plotted.

Be sure to convert the inputted angle to radians before adding it to the angles array. Also add a series of comment statements (lines starting with a # symbol) at the beginning of your function file that state briefly what the function does, who the author was, and the date when it was written. Make sure you have no completely blank lines between the comment lines.

What is the location of the lowest point in the polygon when input angle is 135 degrees ? Enter your results as vector of two elements [X Y] and do not add any extra spaces. Round your answer up to 4 decimal places , for example. [5.8459,-4.6514]

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

10-3 How has e-commerce transformed marketing?

Answered: 1 week ago