Question: python Assignment #4 Create a new notebook with the name format: Lastname_HomeworkNumber. For example, CychB_HW 4 Create a markdown block in which you will describe

python

python Assignment #4 Create a new notebook with the name format: Lastname_HomeworkNumber.

Assignment #4 Create a new notebook with the name format: Lastname_HomeworkNumber. For example, CychB_HW 4 Create a markdown block in which you will describe what the notebook does. 1. The equations for an ellipse are: x -a cos( $theta$), y-b sin( $Itheta$) $a$ is the major radius $b$ is the minor radius $Itheta$ is the angle a. Write a lambda function that returns $x$ and Sy$ given $a$, Sb$, and $itheta$. Assume that theta goes from 0 to 360. Remember that trig functions assume the arguments are in radians b. Plot your ellipse using matplotlib.pyplot (imported as plt). Use the %matplotlib nline magic command 2. Write a lambda function that returns the square of an input parameter $x$ a. Use map) to generate a list of squares for a sequence with 10 values b. Use filter) and the lambda function to generate a list of squares that are between 5 and 50. c. Use a list comprehension to generate the same list with only one line of code. 3. Create a Class, it should include at least 3 attributes and 3 methods. Be creative! Here are a few possibilities- Card, Deck, Planet, Phone Contact, Ocean, Student, Cellphone, Dog, Car a. Save your class in a module, import the module into your notebook b. Create 3 instances of your class, change the value of at least one attribute for one instance of your class c. Call all three of your methods- you can use any of the instances of your class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!