Sunteți pe pagina 1din 2

Name:__________________________ Date:_________________________ Band:________

Calculus | Packer Collegiate Institute

Riemann Sum Program

Solve by hand (without your calculator program): y = x 2 on [1,3] with 4 LH rectangles


y
9

−2.0 −1.5 −1.0 −0.5 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0

Program Letters Example: y = x 2 on [1,3]


with 4 LH rectangles
A stands for ________________ What we enter as users
A is ________________
B stands for ________________
B is ________________
N stands for ________________
N is ________________
H stands for ________________
R is ________________
S stands for ________________
What the calculator calculates
X stands for ________________
H is ________________
R stands for ________________
________________ S is ________________

1
Let’s go through the program and look at what it is doing, paying close attention to the FOR LOOP:

Before the for loop starts running:

S= X=

When the for loop starts running, it will repeat _____ times.

At the end of each for loop

When I=1 S= X=
When I=2 S= X=
When I=3 S= X=
When I=4 S= X=

S represents the ___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

X represents the ___________________________________________________________________

___________________________________________________________________

What does the line do in the program?

What does the line do in the program?

Assume we wanted to do right handed rectangles. We set R=1.

Before the for loop starts running:

S= X=

When the for loop starts running, it will repeat _____ times.

At the end of each for loop

When I=1 S= X=
When I=2 S= X=
When I=3 S= X=
When I=4 S= X=

What does setting R=1 do which makes the program calculate right handed rectangles? ________________

________________________________________________________________________________.

S-ar putea să vă placă și