- By Subject
- History
- Nine Terms and a Date for Statebuilding Review (Submit Online)
- November 28
- Video Review 1 (Submit Online)
- November 28
- Video Review 2 (Submit Online)
- November 28
- Group Peer Review (Submit Online)
- Due November 22
- Final Exam
- Due December 2nd 8am
- Mathematics
- Final Exam
- Due December 6th 8am
- Business Writing
- Business Writing Final is Due
- December 1st 11:30am
- Notebook Check is Due
- December 1st 11:30am
- Information Systems
- Final Exam
- December 7th 11:30am
- By Date
- November 22
- History
- Group Peer Review (Submit Online)
- November 28
- History
- Nine Terms and a Date for Statebuilding Review (Submit Online)
- Video Review 1 (Submit Online)
- Video Review 2 (Submit Online)
- December 1st 11:30am
- Business Writing
- Business Writing Final Due
- Notebook Check Due
- December 2nd 8am
- History
- Final Exam
- December 6th 8am
- Mathematics
- Final Exam
- December 7th 11:30am
- Information Systems
- Final Exam
Tuesday, November 22, 2016
To Do
Saturday, November 19, 2016
Random Python Programs November 20 2016
Deck Builder Program v1
def program1(deckname,nameofdeck):print("----------------------")
if (len(deckname)) < 40:
print("*This deck is below the deck minimum.*")
if (len(deckname)) > 60:
print("*This deck is past the deck limit.*")
print(nameofdeck)
print(deckname)
print ("Number of cards in deck:",len(deckname))
action = input("Rename your deck, add a card to your deck, remove a card from your deck, check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
if action == "rename":
print("----------------------")
newname = input("What would you like to rename your deck?:")
(newname) = (deckname)
deckname = (newname)
nameofdeck = (newname)
program1(deckname,nameofdeck)
if action == "add":
print("----------------------")
add = input("What Card Would you like to Add to The Deck?:")
counter = int(input("How many copies would you like to add to the deck?:"))
while counter>0:
deckname.append(add)
counter -= 1
program1(deckname,nameofdeck)
if action == "remove":
print("----------------------")
remove = input ("What Card Would you like to Remove From The Deck?:")
counter = int(input("How many copies would you like to remove from the deck?:"))
while counter>0:
deckname.remove(remove)
counter -= 1
program1(deckname,nameofdeck)
if action == "check":
print("----------------------")
check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
if check == "number":
print("----------------------")
number = input("What card would you like to count in the deck?:")
print(number,"occurs",deckname.count(number),"times in this deck.")
program1(deckname,nameofdeck)
if check == "if":
print("----------------------")
check = input("What card would you like to check to see if it is in the deck?:")
if check in deckname:
print(check, "is in",nameofdeck)
program1(deckname,nameofdeck)
else:
print(check,"is not in",nameofdeck)
program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)
Deck Builder Program v2
def program1(deckname,nameofdeck):
print("----------------------")
if (len(deckname)) < 40:
print("*This deck is below the deck minimum.*")
if (len(deckname)) > 60:
print("*This deck is past the deck limit.*")
print(nameofdeck)
print(deckname)
print ("Number of cards in deck:",len(deckname))
action = input("Rename your deck, add a card to your deck, remove a card from your deck, check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
if action == "rename":
print("----------------------")
newname = input("What would you like to rename your deck?:")
(newname) = (deckname)
deckname = (newname)
nameofdeck = (newname)
program1(deckname,nameofdeck)
if action == "add":
print("----------------------")
add = input("What Card Would you like to Add to The Deck?:")
counter = int(input("How many copies would you like to add to the deck?:"))
if (deckname.count(action)) == 3:
print("You cannot add more than three copies of a card to your deck.")
print("Action canceled")
program1(deckname,nameofdeck)
if counter > 3:
print("You cannot add more than three copies of a card to your deck.")
print("Action canceled")
program1(deckname,nameofdeck)
while counter>0:
deckname.append(add)
counter -= 1
program1(deckname,nameofdeck)
if action == "remove":
print("----------------------")
remove = input ("What Card Would you like to Remove From The Deck?:")
counter = int(input("How many copies would you like to remove from the deck?:"))
while counter>0:
deckname.remove(remove)
counter -= 1
program1(deckname,nameofdeck)
if action == "check":
print("----------------------")
check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
if check == "number":
print("----------------------")
number = input("What card would you like to count in the deck?:")
print(number,"occurs",deckname.count(number),"times in this deck.")
if (deckname.count(number)) > 3:
print("There are too many copies of",number,"in the deck.")
program1(deckname,nameofdeck)
if check == "if":
print("----------------------")
check = input("What card would you like to check to see if it is in the deck?:")
if check in deckname:
print(check, "is in",nameofdeck)
program1(deckname,nameofdeck)
else:
print(check,"is not in",nameofdeck)
program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)
Deck Builder Program v3
def program1(deckname,nameofdeck):
print("----------------------")
if (len(deckname)) < 40:
print("*This deck is below the deck minimum.*")
if (len(deckname)) > 60:
print("*This deck is past the deck limit.*")
print(nameofdeck)
print(deckname)
print ("Number of cards in deck:",len(deckname))
action = input("Rename your deck, add a card to your deck, remove a card from your deck, check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
if action == "rename":
print("----------------------")
newname = input("What would you like to rename your deck?:")
(newname) = (deckname)
deckname = (newname)
nameofdeck = (newname)
program1(deckname,nameofdeck)
if action == "add":
print("----------------------")
add = input("What Card Would you like to Add to The Deck?:")
counter = int(input("How many copies would you like to add to the deck?:"))
if (deckname.count(action)) == 3:
print("You cannot add more than three copies of a card to your deck.")
print("Action canceled")
program1(deckname,nameofdeck)
if counter > 3:
print("You cannot add more than three copies of a card to your deck.")
print("Action canceled")
program1(deckname,nameofdeck)
while counter>0:
deckname.append(add)
counter -= 1
program1(deckname,nameofdeck)
if action == "remove":
print("----------------------")
remove = input ("What Card Would you like to Remove From The Deck?:")
counter = int(input("How many copies would you like to remove from the deck?:"))
while counter>0:
deckname.remove(remove)
counter -= 1
program1(deckname,nameofdeck)
if action == "check":
print("----------------------")
check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
if check == "number":
print("----------------------")
number = input("What card would you like to count in the deck?:")
print(number,"occurs",deckname.count(number),"times in this deck.")
if (deckname.count(number)) > 3:
print("There are too many copies of",number,"in the deck.")
program1(deckname,nameofdeck)
if check == "if":
print("----------------------")
check = input("What card would you like to check to see if it is in the deck?:")
if check in deckname:
print(check, "is in",nameofdeck)
program1(deckname,nameofdeck)
else:
print(check,"is not in",nameofdeck)
program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)
Deck Builder Program v4
Wednesday, November 16, 2016
Infinite Floyd Triangle (It never stops)
def floyd_triangle(level):
a = level
program2(level,a,1,2,1)
def program2(level,a,start,stop,row):
if a == level:
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
elif a>0:
start = stop
stop = stop+row
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
else:
print("[Complete]")
floyd_triangle(3)
print("-------------------------")
floyd_triangle(5)
a = level
program2(level,a,1,2,1)
def program2(level,a,start,stop,row):
if a == level:
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
elif a>0:
start = stop
stop = stop+row
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
else:
print("[Complete]")
floyd_triangle(3)
print("-------------------------")
floyd_triangle(5)
Sunday, November 13, 2016
November 13-18 2016 Agenda
- November 13: Sunday
- November 14: Monday
- History
- Read pg.315-321 and the Hassig Paper
- Programming
- November 15: Tuesday
- Math
- 13.2 assignment
- Business Writing
- Give Comic Speech
- November 16: Wednesday
- History
- Video Project
- Read pp. 435Ming State and Commercial Revolution & Chinese Exams (RPQ)
- Programming
- November 17: Thursday
- Math
- Test
- Business Writing
- November 18: Friday
- Programming
Monday, November 7, 2016
Programming: Relevant Class Announcements
Prime Numbers Announcement
# What are prime numbers?
# http://www.programiz.com/python-programming/examples/prime-number
def isPrime(num):
if isinstance(num, float) or isinstance(num, int):
if isinstance(num,bool) or int(num) != num:
print("Illegal input")
elif num > 1:
# check for factors
num = int(num)
for i in range(2,num):
if (num % i) == 0:
print(num,"is not a prime number")
print(i,"times",num//i,"is",num)
break
else:
print(num,"is a prime number")
# if input number is less than
# or equal to 1, it is not prime
else:
print(num,"is not a prime number")
else:
print("Illegal input")
isPrime([3,4])
isPrime(True)
isPrime(3.0)
isPrime(-4.3)
isPrime("a")
isPrime(5.6)
isPrime(407)
isPrime(17)
Multiplication Table Announcement
def multi_table(a,b):
if a > b:
small = b
large = a
else:
small = a
large = b
print("{:<6 br="" end="" format=""> for head in range(small,large+1,1):
print("{:<6 br="" end="" format="" head=""> print("")
for row in range(small,large+1,1):
print("{:<6 br="" end="" format="" row=""> for col in range(small,large+1,1):
print("{:<6 br="" col="" end="" format="" row=""> print("")
multi_table(11,17)
print("------------------")
multi_table(17,11)6>6>6>6>
Exam 3
Exam 3 will be held on Nov 7 and 9. On Monday (11/7), you will see one question and on Wednesday (11/9) you will see another question. Exam 3 covers everything up to and including Chapter 7. It is open book and open notes, but it is closed on any living thing.
Friday, November 4, 2016
Programming Exam#3 Tips
- Day One: November 7th
- Read all the announcements on Canvas
- Especially the Python Code
- Day Two: November 9th
- Hint #1
- We have done this before.
- It uses the pmt function and nested loops.
- Day Three: November 11th
- Cancelled
- Things to Review Before the Exams
- The announcements on Canvas
- PMT functions in Python
- How to do Nested Loops
Thursday, November 3, 2016
Schedule: November 4th to November 15th
Subject by Subject Schedule
- History
Read pg.426-431,437-446- Due November 7th
Crashcourse Assignment- Due November 9th
Read pg. 458-467- Due November 9th
- Read pg.315-321 and the Hassig Paper
- Due November 14th
- Programming
- Mathematics
13.1 Assignment- Due November 8th
- 13.2 Assignment
- Due November 15th
- Business Writing
Write and Submit a Proposal- Due November 10th
- Design and Submit a Logo
- Due November 10th
Earliest Due Date to Latest Due Date
November 7thRead pg.426-431,437-446- November 8th
13.1 Assignment- November 9th
Crashcourse AssignmentRead pg.456-467- November 10th
Write and Submit a Proposal- Design and Submit a Logo
- November 14th
- Read pg.315-321 and the Hassig Paper
- November 15th
- 13.2 Assignment
Day by Day Schedule
Friday: November 4th- Read pg.426-431,437-446
- Work on 13.1 Assignment
- Work on CrashCourse Assignment
- Work on Proposal Assignment
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
Saturday: November 5th- Read pg.426-431,437-446
- Work on 13.1 Assignment
- Work on CrashCourse Assignment
- Work on Proposal Assignment
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
Sunday: November 6th- Read pg.426-431,437-446
Work on 13.1 Assignment- Work on CrashCourse Assignment
- Work on Proposal Assignment
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Monday: November 7th
Due: Read pg.426-431,437-446Work on 13.1 Assignment- Work on CrashCourse Assignment
- Work on Proposal Assignment
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Tuesday: November 8th
13.1 Assignment is DueWork on CrashCourse Assignment- Read Pg.456-467
- Work on Logo Assignment
Work on Proposal Assignment- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Wednesday: November 9th
Crashcourse Assignment is DueReading is Due- Work on Logo Assignment
Work on Proposal Assignment- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Thursday: November 10th
Proposal Assignment is Due- Logo Assignment is Due
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Friday: November 11th
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Saturday: November 12th
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Sunday: November 13th
- Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Monday: November 14th
- Due: Read pg.315-321 and the Hassig Paper
- Work on 13.2 Assignment
- Tuesday: November 15th
- 13.2 Assignment is Due
Proposal Notes
- Proposal Basics
- What Questions Does A Proposal Answer?
- What do we have a need for?
- How should we respond to this need?
- What resources do we need, in order to respond to this need?
- Solicited Proposal
- When you submit a proposal to a company, after the company asks for said proposal.
- Unsolicited Proposal
- When you submit a proposal to a company, when the company does not ask for said proposal.
- Internal Proposal
- When you submit a proposal to the company of which you are apart of.
- External Proposal
- When you submit a proposal to a company of which you are not a member of.
Random Python Programs: November 2 2016
Flashcard Prototype 1
counter = 0
while counter>=0:
print("----------------------------")
title = input("What is the Title of This flashcard?:")
contents = input("What are the Contents of this flashcard?:")
counter += 1
print("----------------------------")
print("Flashcard",counter)
print("Title:",title)
print("Contents:",contents)
Flashcard Prototype 2
title = input("What would you like to name these notes?:")
title = title +".txt"
file = open(title, "w")
counter = 0
while counter>=0:
title = input("What is the Title of This flashcard?:")
contents = input("What are the Contents of this flashcard?:")
counter += 1
print("----------------------------")
print("Flashcard",counter)
print("Title:",title)
print("Contents:",contents)
print("----------------------------")
a = "Flashcard" + " "+str(counter)
b = "Title:"+" "+title
c ="Contents:"+" "+contents
file.write("----------------------------")
file.write(a)
file.write(b)
file.write(c)
file.write("----------------------------")
Wednesday, November 2, 2016
Python Multiplication Table: Provided by Teacher
def multi_table(a,b):
if a > b:
small = b
large = a
else:
small = a
large = b
print("{:<6 br="" end="" format=""> for head in range(small,large+1,1):
print("{:<6 br="" end="" format="" head=""> print("")
for row in range(small,large+1,1):
print("{:<6 br="" end="" format="" row=""> for col in range(small,large+1,1):
print("{:<6 br="" col="" end="" format="" row=""> print("")
multi_table(11,17)
print("------------------")
multi_table(17,11)6>6>6>6>
Tuesday, November 1, 2016
November 1st to November 4th: To-Do List: Agenda
- History
Read: 393-396, 404-405, 414-420 Due 11/2/16- Programming
- Math
- 13.1 Assignment due 11/8/16
- Business Writing
- Write and Submit a Business Plan Due 11/4/16
- November 1: Tuesday
- Write and Submit a Business Plan
Read: 393-396, 404-405, 414-420- 13.1 Assignment
- November 2: Wednesday
- Write and Submit a Business Plan
History Reading is Due- 13.1 Assignment
- November 3: Thursday
- Business Plan is Due
- 13.1 Assignment
- November 4: Friday
- 13.1 Assignment
Random Python Programs: November 1 2016
Simple Power Rule Antiderivative Calculator 1
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle n being a fraction")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
n = int(input("Input a value for n?:"))
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program1()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program1()
program1()
Simple Antiderivative of Exponential Functions Calculator 1
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^xdx = (1/Ae^(Ax))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
print("1/",A,"e^","(",A,"*","x",")","+C")
program2()
program2()
AntiDerivative Prototypes 1
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle n being a fraction")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
n = int(input("Input a value for n?:"))
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program1()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program1()
program1()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^xdx = (1/Ae^(Ax))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
print("1/",A,"e^","(",A,"*","x",")","+C")
program2()
program2()
AntiDerivative Prototypes 2
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program1()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program1()
program1()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^xdx = (1/Ae^(Ax))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
print("1/",A,"e^","(",A,"*","x",")","+C")
program2()
program2()
AntiDerivative Prototypes 3
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program3()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program3()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^xdx = (1/Ae^(Ax))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
print("1/",A,"e^","(",A,"*","x",")","+C")
program3()
def program3():
print("This program is designed for solving antiderivates.")
action = input("Do you need to solve an antiderivative using the Power Rule (p) or are you finding the antiderivative of exponential functions (e) Please choose (p or e):")
if action == "p":
program1()
if action == "e":
program2()
program3()
AntiDerivative Prototypes 4
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program3()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program3()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^kxdx = (A(1/k)e^(kx))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
k = int(input("Input a value for k?:"))
print("1/",A,"e^","(",A,"*",k,"x",")","+C")
program3()
def program3():
print("This program is designed for solving antiderivates.")
action = input("Do you need to solve an antiderivative using the Power Rule (p) or are you finding the antiderivative of exponential functions (e) Please choose (p or e):")
if action == "p":
program1()
if action == "e":
program2()
program3()
AntiDerivative Prototypes 5
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program3()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program3()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^kxdx = (A(1/k)e^(kx))+C")
print("------------------------------------------------------------------------")
A = int(input("Input a value for A?:"))
k = int(input("Input a value for k?:"))
print(A,"(","1/",k,")","e^","(",k,"x",")","+C")
program3()
def program3():
print("This program is designed for solving antiderivates.")
action = input("Do you need to solve an antiderivative using the Power Rule (p) or are you finding the antiderivative of exponential functions (e) Please choose (p or e):")
if action == "p":
program1()
if action == "e":
program2()
program3()
AntiDerivative Prototypes 6
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = int(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program3()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program3()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^kxdx = (A(1/k)e^(kx))+C")
print("------------------------------------------------------------------------")
A = str(input("Input a value for A?:"))
k = str(input("Input a value for k?:"))
print(A,"(","1/",k,")","e^","(",k,"x",")","+C")
program3()
def program3():
print("This program is designed for solving antiderivates.")
action = input("Do you need to solve an antiderivative using the Power Rule (p) or are you finding the antiderivative of exponential functions (e) Please choose (p or e):")
if action == "p":
program1()
if action == "e":
program2()
program3()
AntiDerivative Prototypes 7
def program1():
print("This program takes the antiderivative using the following formula.")
print("Formula: Ax^ndx = A(1/n+1)x^(n+1)+C")
print("This Program Cannot Handle the Antiderivative of Exponential Functions.")
print("------------------------------------------------------------------------")
nnumerator = int(input("Input a value for the numerator of n?:"))
ndenominator = int(input("Input a value for the denominator of n?:"))
n = nnumerator/ndenominator
A = str(input("Input a value for A?:"))
if n == -1:
print("Solution = ",A,"*","ln|x|+C")
program3()
else:
a = n+1
b = 1/a
print("Solution = ",A,"(","1/",a,")","*","x","^","(",a,")","+C")
program3()
def program2():
print("This program takes the antiderivative of exponential functions using the following formula.")
print("Formula: Ae^kxdx = (A(1/k)e^(kx))+C")
print("------------------------------------------------------------------------")
A = str(input("Input a value for A?:"))
k = str(input("Input a value for k?:"))
print(A,"(","1/",k,")","e^","(",k,"x",")","+C")
program3()
def program3():
print("This program is designed for solving antiderivates.")
action = input("Do you need to solve an antiderivative using the Power Rule (p) or are you finding the antiderivative of exponential functions (e) Please choose (p or e):")
if action == "p":
program1()
if action == "e":
program2()
program3()
AntiDerivative Prototypes 8
Monday, October 31, 2016
Random Python Programs: October 31 2016
Bloom A-life Simulator Prototype 1
import randomcname = Bloom
wname = Eartfea
chealth = 1
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
while chealth>0:
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("A new year has arrived.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
if wtemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
if wtemp>cmaxtemp:
cod = "Heat Exhaustion"
chealth -= 1
if wtemp
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
if wtemp
chealth -= 1
if cmintemp>=wtemp<=cmaxtemp:
print("Today was a Fine Day")
print("-----------------------")
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: p=""> print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
1:>
Bloom A-life Simulator Prototype 2
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 1
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
while chealth>0:
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("A new year has arrived.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
if wtemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
if wtemp>cmaxtemp:
cod = "Heat Exhaustion"
chealth -= 1
if wtemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
if wtemp
cod = "Froze to Death"
chealth -= 1
if cmintemp>=wtemp<=cmaxtemp:
print("Today was a Fine Day")
print("-----------------------")
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 3
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 1
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
while chealth>0:
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("A new year has arrived.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
if wtemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
if wtemp>cmaxtemp:
cod = "Heat Exhaustion"
chealth -= 1
if wtemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
if wtemp
cod = "Froze to Death"
chealth -= 1
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 4
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
while chealth>0:
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("A new year has arrived.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
if ctemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 5
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
while chealth>0:
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("A new year has arrived.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
if ctemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 6
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and wtemp>cmaxtemp or wtemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter=0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 7
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and wtemp>cmaxtemp or wtemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter=0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 8
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and wtemp>cmaxtemp or wtemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 9
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and wtemp>cmaxtemp or wtemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 10
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and ctemp>cmaxtemp or ctemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if shelter == 1 and ctemp>cmaxtemp or ctemp
if wtemp>0:
ctemp -= wtemp
if ctemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtemp<0: div="">0:>
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp
if ctemp>cmaxtemp:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
print("-----------------------")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 11
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and ctemp>cmaxtemp or ctemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
print("-----------------------")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 12
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and ctemp>cmaxtemp or ctemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -=furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -=furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
print("-----------------------")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 13
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and ctemp>cmaxtemp or ctemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -= furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -= furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
print("-----------------------")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(cmintemp,cmaxtemp)+furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 14
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
cmintemp = 70
cmaxtemp = 115
furtemp = 5
wmintemp = 70
wmaxtemp = 134
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(97,99)+furtemp+wtemp
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0 and ctemp>cmaxtemp or ctemp
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if survivalchance == 0:
print(cname,"does not search for shelter.")
if ctemp>cmaxtemp and shelter==0:
print("Today is a Hot Day")
print("-----------------------")
shedchance = random.randint(0,1)
if shedchance==0:
print(cname,"did not shed fur to survive the harsh heat.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if shedchance==1:
ctemp -= furtemp
furtemp -= 1
ctemp += furtemp
print(cname,"shed fur to survive the heat")
if ctemp>cmaxtemp:
print("It wasn't very effective.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if ctemp
print("It was super effective.")
print("-----------------------")
if ctemp
print("Today is a Cold Day")
print("-----------------------")
furgrowth = random.randint(0,1)
if furgrowth==0:
print(cname,"did not grow fur to survive the cold.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if furgrowth==1:
ctemp -= furtemp
furtemp += 1
ctemp += furtemp
print(cname,"grew fur to survive.")
if ctemp
print("It wasn't very effective.")
cod = "Froze to Death"
chealth -= 1
if ctemp>cmintemp:
print("It was super effective!")
print("-----------------------")
if wtempcmintemp:
print("Today was a Fine Day")
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"decides to search for shelter.")
survivalchance = random.randint(1,6)
if survivalchance == 6:
shelter = 1
print (cname,"found shelter!")
print("-----------------------")
else:
print (cname,"failed to find shelter.")
print("-----------------------")
if shelter == 1:
print(cname,"went out into the world to explore.")
print("-----------------------")
shelter = 0
day += 1
wtemp = random.randint(wmintemp,wmaxtemp)
ctemp = random.randint(97,99)+furtemp+wtemp
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 15
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
shelter = 0
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 16
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year,")
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 17
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
if survivalchance == 1:
print(cname,"is comfortable.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 18
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
print("-----------------------")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
print("-----------------------")
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
print("-----------------------")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
print("-----------------------")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
print("-----------------------")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
day += 1
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 19
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
print("-----------------------")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
print("-----------------------")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
print("-----------------------")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
day += 1
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 20
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
print("-----------------------")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
print("-----------------------")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
print("-----------------------")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
day += 1
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 21
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 50
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
print("-----------------------")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
print("-----------------------")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
print("-----------------------")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
day += 1
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Bloom A-life Simulator Prototype 22
import random
cname = "Bloom"
wname = "Eartfea"
chealth = 6
birthday = 1
day = 1
year = 1
shelter = 0
wtemp = "Comfortable"
ctemp = "Comfortable"
while chealth>0:
if year>=71:
survivalchance = random.randint(0,1)
if survivalchance == 1:
print(cname,"appears to be living a long and happy life.")
print("-----------------------")
if survivalchance == 0:
cod = "Old Age"
chealth = 0
if day==366:
print("Happy New Year.")
print("-----------------------")
year += 1
day = 1
if day==birthday:
print("Happy Birthday",cname)
print("-----------------------")
print("|Adventures of",cname,"|Day:",day,"|Year",year)
print("-----------------------")
if shelter == 0:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is cold.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to grow fur to survive the freezing temperatures.")
print("-----------------------")
cod = "Froze to Death"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and grow fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "is hot.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print(cname, "was unable to shed fur to survive the blazing temperatures.")
print("-----------------------")
cod = "Heat Exhaustion"
chealth -= 1
if survivalchance == 1:
print(cname, "was able to adapt to the enviornment and shed fur to survive the harsh weather.")
print("-----------------------")
if survivalchance == 1:
print(cname,"is comfortable.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print (cname,"doesn't attempt to search for shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname,"attempts to search for shelter.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance == 0:
print (cname,"fails to find shelter.")
print("-----------------------")
if survivalchance == 1:
print (cname, "successfully finds shelter.")
print("-----------------------")
shelter = 1
if shelter == 1:
survivalchance = random.randint(0,2)
if survivalchance == 0:
wtemp = "Cold"
print("Today is a Cold Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 1:
wtemp = "Hot"
print("Today is a Hot Day.")
print(cname, "is comfortable inside their shelter.")
print("-----------------------")
if survivalchance == 2:
wtemp = "Comfortable"
print("Today is a Fine Day.")
print("-----------------------")
survivalchance = random.randint(0,1)
if survivalchance==0:
print(cname,"spends a nice day inside their shelter.")
print("-----------------------")
if survivalchance==1:
print(cname,"decides to go on an adventure and explore outside the shelter.")
print("-----------------------")
shelter = 0
print("|Adventures of",cname,"|Day:",day,"|Year",year,"|World Temperature:",wtemp,"|Creature Temperature",ctemp)
print("-----------------------")
day += 1
if chealth<1: div="">1:>
print(cname,"has died of",cod,"on day",day,"of year",year,"on world",wname)
print("The temperature was:",wtemp,cname,"'s temperature was",ctemp)
print("-----------------------")
Subscribe to:
Posts (Atom)