Download (right-click, save target as ...) this page as a jupyterlab notebook from: Lab6-HW


Laboratory 6: FUN with functions

LAST NAME, FIRST NAME

R00000000

ENGR 1330 Laboratory 6 - Homework


Exercise 1

Make a function that cubes its input:

$$ f(x) = x^3 $$

and test it for the following values of x:


Exercise 2

Generate two lists:

  1. x ranging from 0 to 9 in steps of 1
  2. f(x) from your function in Exercise 1

Use the plotAline() function (below) to create a plot of

$$ y = x^3 $$

for x raging from 0 to 9 (inclusive) in steps of 1.

Label the plot and the plot axes.

A wrapper script is included below that needs completion to work and draw the plot.


Exercise 3

Modify the wrapper script for the plotAline() function to create a plot of $$ x = 16sin^3(t) $$ $$ y = 13cos(t) - 5cos(2t) - 2cos(3t) - cos(4t) $$ for t raging from [0,2$\Pi$] (inclusive).

Label the plot and the plot axes.