Add complete assignment description and starter code.

This commit is contained in:
Rob Hess
2019-05-14 12:00:45 -07:00
commit ee407b6450
16 changed files with 798 additions and 0 deletions

6
testing_code/p1.py Normal file
View File

@@ -0,0 +1,6 @@
pi = 3.1415
r = 8.0
circle_area = pi * r * r
circle_circum = pi * 2 * r
sphere_vol = (4.0 / 3.0) * pi * r * r * r
sphere_surf_area = 4 * pi * r * r

14
testing_code/p2.py Normal file
View File

@@ -0,0 +1,14 @@
a = True
b = False
x = 7
if a:
x = 5
if b:
y = 4
else:
y = 2
z = (x * 3 * 7) / y
if z > 10:
y = 5

14
testing_code/p3.py Normal file
View File

@@ -0,0 +1,14 @@
# This program computes and returns the n'th Fibonacci number.
n = 6
f0 = 0
f1 = 1
i = 0
while True:
fi = f0 + f1
f0 = f1
f1 = fi
i = i + 1
if i >= n:
break
f = f0