Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #************************#
- #* Jadday's Amazing *#
- #* Evolution Simulator *#
- #************************#
- import random
- print("The Evolution Starts Here")
- numcs = 100
- def generation1():
- global numcs
- profiles = []
- maxscore = 0
- minscore = 100
- x = 0
- for i in range(0,numcs):
- a = random.randint(0,75)
- b = random.randint(a,100)
- score = random.randint(a,b)
- name = [a,b]
- x = str(x)
- x = int(x)
- x = x + 1
- if score > maxscore:
- maxscore = score
- score = str(score)
- best = score
- score = int(score)
- if score < minscore:
- minscore = score
- score = str(score)
- worst = score
- score = int(score)
- score = str(score)
- profile = score
- score = int(score)
- profiles.append(score)
- profiles = [int(x) for x in profiles]
- profiles.sort()
- print(profile)
- print("")
- print("")
- print("The best was:")
- print(best)
- print("")
- print("The worst was:")
- print(worst)
- numcs = numcs // 2
- templength = len(profiles)
- length = templength // 2
- for x in range(0,length):
- del profiles[0]
- print("")
- print(profiles)
- def generation():
- global numcs
- profiles = []
- maxscore = 0
- minscore = 100
- x = 0
- for i in range(0,numcs):
- a = profiles[i]
- a = a / 2
- b = profiles[i]
- b = b * 2
- score = random.randint(a,b)
- name = [a,b]
- x = str(x)
- x = int(x)
- x = x + 1
- if score > maxscore:
- maxscore = score
- score = str(score)
- best = score
- score = int(score)
- if score < minscore:
- minscore = score
- score = str(score)
- worst = score
- score = int(score)
- score = str(score)
- profile = score
- score = int(score)
- profiles.append(score)
- profiles = [int(x) for x in profiles]
- profiles.sort()
- print(profile)
- print("")
- print("")
- print("The best was:")
- print(best)
- print("")
- print("The worst was:")
- print(worst)
- numcs = numcs // 2
- templength = len(profiles)
- length = templength // 2
- for x in range(0,length):
- del profiles[0]
- print("")
- print(profiles)
- generation1()
- for x in range(0,6):
- generation()
- numcs = numcs // 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement