我是否选择了正确的方程来计算这个?
Did I choose the correct equation to calculate this?
我不确定这里是否真的有错误,但我(出于好奇)创建了一个程序来计算大约 241 代人中有多少人……假设 亲密关系 Z 世代只有一个人出生之前,然后在整个 Z 世代出生之前有多少人有 亲密关系。
先决条件:Z世代有7210万人,一个世代持续25年。所有的关系都是一夫一妻制的。每对夫妇有一个 child.
import time
#I made this program out of pure curiousity (I'm not lewd, I promise) and I found it pretty interesting.
#Bunny art
print(" z")
print(" z")
print(" z")
print("(\(\ ")
print("(– -)")
print("(‘)(’)")
#Variable Declarations
generationLength = 25
totalYears = 6026
numberOfGenerations = totalYears / generationLength
numberOfCalculations = 0
numberOfPeople = 1
numberOfPeopleOnEarth = 7750000000
numberOfPeopleInThisGeneration = 72100000
def howManyPeopleHadSexBeforeICameIntoExistence():
#Mathematics
numberOfCalculations = 0
while (numberOfCalculations < numberOfGenerations):
numberOfPeople = numberOfGenerations * 2
numberOfCalculations = numberOfCalculations + 1
#Output
time.sleep(2)
print("\nCalculating pointless knowledge...")
time.sleep(2)
print("At least " + str(round(numberOfPeople)) + " people in had sex before one person in Generation Z was born.")
#Mathematics
total = round(numberOfPeople * numberOfPeopleInThisGeneration)
#Output
time.sleep(2)
print("\nCalculating extra trivia...")
time.sleep(2)
print("At least " + str(total) + " had sex before every person in Generation Z was born.")
howManyPeopleHadSexBeforeICameIntoExistence()
import time
# I made this program out of pure curiousity (I'm lewd, I promise) and I found it pretty interesting.
# Bunny art
print(" z")
print(" z")
print(" z")
print("(\(\ ")
print("(– -)")
print("(‘)(’)")
# Variable Declarations
generationLength = 25
totalYears = 6026
numberOfGenerations = totalYears / generationLength
numberOfPeopleOnEarth = 7750000000
numberOfPeopleInThisGeneration = 72100000
percentage_of_current_generation = numberOfPeopleInThisGeneration/numberOfPeopleOnEarth
max_age = 100
def howManyPeopleHadSexBeforeICameIntoExistence():
numberOfPeople = numberOfPeopleInThisGeneration * (2 ** numberOfGenerations) - numberOfPeopleInThisGeneration
# Output
time.sleep(2)
print("\nCalculating pointless knowledge...")
time.sleep(2)
print("At least " + str(round(numberOfPeople)) + " people in history had sex before one person in Generation Z was born.")
# Mathematics
total_alive = round(numberOfPeopleInThisGeneration * (2 ** (max_age/generationLength)) - 1)
# Output
time.sleep(2)
print("\nCalculating extra trivia...")
time.sleep(2)
print("At least " + str(total_alive) + " people currently alive had sex before every person in Generation Z was born.")
howManyPeopleHadSexBeforeICameIntoExistence()
我不确定这里是否真的有错误,但我(出于好奇)创建了一个程序来计算大约 241 代人中有多少人……假设 亲密关系 Z 世代只有一个人出生之前,然后在整个 Z 世代出生之前有多少人有 亲密关系。
先决条件:Z世代有7210万人,一个世代持续25年。所有的关系都是一夫一妻制的。每对夫妇有一个 child.
import time
#I made this program out of pure curiousity (I'm not lewd, I promise) and I found it pretty interesting.
#Bunny art
print(" z")
print(" z")
print(" z")
print("(\(\ ")
print("(– -)")
print("(‘)(’)")
#Variable Declarations
generationLength = 25
totalYears = 6026
numberOfGenerations = totalYears / generationLength
numberOfCalculations = 0
numberOfPeople = 1
numberOfPeopleOnEarth = 7750000000
numberOfPeopleInThisGeneration = 72100000
def howManyPeopleHadSexBeforeICameIntoExistence():
#Mathematics
numberOfCalculations = 0
while (numberOfCalculations < numberOfGenerations):
numberOfPeople = numberOfGenerations * 2
numberOfCalculations = numberOfCalculations + 1
#Output
time.sleep(2)
print("\nCalculating pointless knowledge...")
time.sleep(2)
print("At least " + str(round(numberOfPeople)) + " people in had sex before one person in Generation Z was born.")
#Mathematics
total = round(numberOfPeople * numberOfPeopleInThisGeneration)
#Output
time.sleep(2)
print("\nCalculating extra trivia...")
time.sleep(2)
print("At least " + str(total) + " had sex before every person in Generation Z was born.")
howManyPeopleHadSexBeforeICameIntoExistence()
import time
# I made this program out of pure curiousity (I'm lewd, I promise) and I found it pretty interesting.
# Bunny art
print(" z")
print(" z")
print(" z")
print("(\(\ ")
print("(– -)")
print("(‘)(’)")
# Variable Declarations
generationLength = 25
totalYears = 6026
numberOfGenerations = totalYears / generationLength
numberOfPeopleOnEarth = 7750000000
numberOfPeopleInThisGeneration = 72100000
percentage_of_current_generation = numberOfPeopleInThisGeneration/numberOfPeopleOnEarth
max_age = 100
def howManyPeopleHadSexBeforeICameIntoExistence():
numberOfPeople = numberOfPeopleInThisGeneration * (2 ** numberOfGenerations) - numberOfPeopleInThisGeneration
# Output
time.sleep(2)
print("\nCalculating pointless knowledge...")
time.sleep(2)
print("At least " + str(round(numberOfPeople)) + " people in history had sex before one person in Generation Z was born.")
# Mathematics
total_alive = round(numberOfPeopleInThisGeneration * (2 ** (max_age/generationLength)) - 1)
# Output
time.sleep(2)
print("\nCalculating extra trivia...")
time.sleep(2)
print("At least " + str(total_alive) + " people currently alive had sex before every person in Generation Z was born.")
howManyPeopleHadSexBeforeICameIntoExistence()