Home > database >  Did I choose the correct equation to calculate this?
Did I choose the correct equation to calculate this?

Time:03-25

I'm not sure if there is actually an error here, but I (out of curiosity) created a program that calculated how many people across ~241 generations had... let's say intimate relations before just one person in Generation Z was born, and then following that how many people had intimate relations before the whole population of Generation Z was born.

Prerequisites: There are 72.1 million people in Gen Z, and one Generation lasts 25 years. All relationships are monogamous. Each couple has one 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()

CodePudding user response:

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()
  • Related