ICA 1

Published

August 23, 2026

Due 9/6/26 @ 11:59 PM

Use a Quarto template to create the assignment.

quarto use template inqs909/qs_hw_python

Submit the *.html file to Canvas.

Problem 1

Write a function that takes a numpy array as an input and returns a labeled collection with the mean, median, and variance of the vector.

Problem 2

Write a function for the following equation:

\[f(x, y, z) =\left\{\begin{array}{cc} x^2+\sqrt y & z = 0 \\ x^2+2x+3+ \log(y) & z = 1 \end{array}\right.\]

Include any error messages if necessary.

Problem 3

Create a function that will give you the first x Fibonacci numbers. You must use a for loop.

Problem 4

Create a function that will randomly generate n numbers that are greater than x from a \(Pois(\lambda)\). Use numpy to generate the random variables.