Comm4nd0

The Big Bang

Jul 23rd, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.95 KB | None | 0 0
  1. import os
  2. from random import randrange
  3.  
  4. universe_temp = 1000000000
  5. matter = True
  6. matter_count = 0
  7. anti_matter = False
  8. anti_matter_count = 0
  9. photons = 0
  10. protons = 0
  11. neutrons = 0
  12. electrons = 0
  13. hydrogen_atom = 1
  14. helium_atom = 1
  15. lithium_atom = 1
  16. at_nu_complete = {"Hydrogen": hydrogen_atom, "Helium": helium_atom, "Lithium": lithium_atom}
  17.  
  18.  
  19. class Atomic_nuclei():
  20.     def __init__(self, protons, neutrons, electrons):
  21.         self.protons = protons
  22.         self.neutrons = neutrons
  23.         self.electrons = electrons
  24.  
  25.  
  26.         self.electrons += 1
  27.         if protons == 1 and neutrons == 0:
  28.             at_nu_complete["Hydrogen"] += 1
  29.         elif protons == 2 and neutrons == 2:
  30.             at_nu_complete["Helium"] += 1
  31.         elif protons == 3 and neutrons == 3:
  32.             at_nu_complete["Lithium"] += 1
  33.  
  34. def display():
  35.     print"Universe Temp =  %d" % universe_temp
  36.     print"Matter        =  %d" % matter_count
  37.     print"Anti-Matter   =  %d" % anti_matter_count
  38.     print"Photons       =  %s" % photons
  39.     print(at_nu_complete)
  40.     os.system("cls")
  41.  
  42. def at_nu_gen():
  43.     protons = randrange(0, 4)
  44.     neutrons = randrange(0, 4)
  45.     at_nu = Atomic_nuclei(protons, neutrons, electrons)
  46.     return at_nu
  47.  
  48. while True:
  49.     if universe_temp >= 1000000000:
  50.         matter_count += 1
  51.         anti_matter_count += 1
  52.         photons += 1000000000
  53.         if anti_matter_count > 1000000000:
  54.              matter_count += 1
  55.  
  56.         at_nu = at_nu_gen()
  57.         universe_temp += -1
  58.         display()
  59.  
  60.     if universe_temp <= 999999999:
  61.         electo_magentic_force = True
  62.         weak_force = True
  63.         if matter > 1:
  64.             matter_count += -1000000
  65.             anti_matter_count += -1000000
  66.  
  67.         if photons > 1000000000:
  68.             matter_count = 0
  69.             a = 1000000000
  70.             for a in photons:
  71.                 matter_count += 1
  72.  
  73.         at_nu = at_nu_gen()
  74.         universe_temp += -1
  75.         display()
Advertisement
Add Comment
Please, Sign In to add comment