Skip to content

Commit b7932ae

Browse files
Dan YoungDan Young
authored andcommitted
The First Commit
0 parents  commit b7932ae

File tree

424 files changed

+360649
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+360649
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions

chap01/exercise_2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
print("This Program ilustrates a chaotic function")
2+
x = eval(input("Enter Number"))
3+
for i in range(10):
4+
x = 3.9 * x * (1-x)
5+
print(x)

chap01/exercise_3.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
print("This Program ilustrates a chaotic function")
2+
x = eval(input("Enter Number"))
3+
for i in range(10):
4+
x = 2.0 * x * (1-x)
5+
print(x)

chap01/exercise_5.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("This Program ilustrates a chaotic function")
2+
n = eval(input("How many numbers should I print? "))
3+
x = eval(input("Enter a value between 0 and 1: "))
4+
for i in range(n):
5+
x = 2.0 * x * (1-x)
6+
print(x)

chap01/exercise_6.xlsx

54.2 KB
Binary file not shown.

chap01/exercise_6a.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("This Program ilustrates a chaotic function")
2+
n = eval(input("How many numbers should I print? "))
3+
x = eval(input("Enter a value between 0 and 1: "))
4+
for i in range(n):
5+
x = 3.9 * x * (1-x)
6+
print(x)

chap01/exercise_6b.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("This Program ilustrates a chaotic function")
2+
n = eval(input("How many numbers should I print? "))
3+
x = eval(input("Enter a value between 0 and 1: "))
4+
for i in range(n):
5+
x = 3.9 * (x - x * x)
6+
print(x)

chap01/exercise_6c.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("This Program ilustrates a chaotic function")
2+
n = eval(input("How many numbers should I print? "))
3+
x = eval(input("Enter a value between 0 and 1: "))
4+
for i in range(n):
5+
x = 3.9 * x - 3.9 * x * x
6+
print(x)

chap01/exercise_7.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
print("This Program ilustrates a chaotic function")
2+
n = eval(input("How many numbers should I print? "))
3+
x = eval(input("Enter a value between 0 and 1: "))
4+
y = eval(input("Enter a different value between 0 and 1: "))
5+
for i in range(n):
6+
x = 3.9 * x - 3.9 * x * x
7+
y = 3.9 * y - 3.9 * y * y
8+
print(x, y)

chap02/annualized_interest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def main():
2+
print("This program calculates the future value\n", "of an annualized investment.")
3+
principal = eval(input("Enter the initial principal: "))
4+
apr = eval(input("Enter the annual interest rate in perecents: "))
5+
year = eval(input("Enter the length of investment in years: "))
6+
deposit = eval(input("Enter the amount to be deposited each month: "))
7+
8+
for i in range (year):
9+
principal = (principal * (1 + (apr * .01))) + (deposit * 12)
10+
print("The value in", year, "years is", principal)
11+
12+
main()

0 commit comments

Comments
 (0)