Showing posts with label Random Python Programs. Show all posts
Showing posts with label Random Python Programs. Show all posts

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)

Thursday, November 3, 2016

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("----------------------------")

Tuesday, November 1, 2016

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 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: 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("-----------------------")


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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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="">
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("-----------------------")