python programming

profiledasco24
homework1.pdf

Homework 1

1. Use a for loop to print values of the first 100 perfect cubes (whole numbers raised to the third power).

2. Use a for loop to implement

a. Left endpoint rule

b. Midpoint rule

c. Right endpoint rule

to approximate the definite integral ∫ π 2

0

cos8 xdx

with a regular partition

0 = x0 < x1 < x2 < x3 < x4 < x5 < x6 < x7 < x8 < x9 < x10 = π

2

xi = ih, i = 0, 1, 2, . . . , 10, and, h = π

20

Due: January 26, 2023

1