title: When I run this program (this is a part of a much bigger program) the 'open egg' feature does not work a lot of the time. It doesn't even run the code
body: <pre><code>    if (shop == &quot;egg&quot;):
     input3 = input(&quot;There are 3 eggs you can buy. Buy standard egg ($10,000 input standard), gold egg ($100,000 input gold), or diamond egg? ($1,000,000 input diamond, requires 1 rebirth).&quot;)
     
       #Eggs
     if (input3 == &quot;standard&quot; and cash &gt; 9999):#standard egg 
        print(&quot;Opening egg...&quot;) &gt;this is the part of the code that fails to run
        sleep(1)
        petchance = randint(1,4)
        if (petchance &lt; 4 and dog == &quot;unopened&quot;):
         dog = &quot;opened&quot;
         moneygain += 5
         print(&quot;You got a dog. It gives you +5 click power&quot;)
        if (petchance == 4 and cat == &quot;unopened&quot;):
         cat = &quot;opened&quot;
         companionmulti += 1.2
         print(&quot;You got a cat. It gives you x1.2 multiplier.&quot;)
       
     if (input3 == &quot;gold&quot; and cash &gt; 99999):
        print(&quot;Opening egg...&quot;)
        sleep(1)
        petchance = randint(1,100)
        if (petchance &lt;= 50 and reindeer == &quot;unopened&quot;):
         reindeer = &quot;opened&quot;
         companionmulti += 1.4
         print(&quot;You got a reindeer. It gives you x1.4 multi.&quot;)
        if (petchance &gt;= 94 and petchance &gt; 50 and robot == &quot;unopened&quot;):
         robot = &quot;opened&quot;
         moneygain += 10
         print(&quot;You got a robot. It gives you +10 click power.&quot;)
        if (petchance &gt; 94 and werewolf == &quot;unopened&quot;):
         werewolf = &quot;opened&quot;
         companionmulti += 10
         print(&quot;You got a werewolf. It gives you x10 multi.&quot;)
         
     if (input3 == &quot;diamond&quot; and cash &gt;= diamondeggprice and rebirths &gt; 0):
        print(&quot;Opening egg...&quot;)
        sleep(1)
        petchance = randint(1,200)
        if (petchance &lt;= 120 and dragon == &quot;unopened&quot;):
         dragon = &quot;opened&quot;
         moneygain += 50
         print(&quot;You got a dragon. It gives you +50 click power.&quot;)
        if (petchance &gt;= 121 and petchance &lt; 200 and calculator == &quot;unopened&quot;):
         calculator = &quot;opened&quot;
         mythic_chance -= 100
         print(&quot;You got a calculator. It gives you a +10% to open a mythic egg.&quot;)
        if (petchance == 200 and hydra == &quot;unopened&quot;):
         hydra = &quot;opened&quot;
         companionmulti += 50
         print(&quot;You got a hydra. It gives you x50 multi.&quot;)
         
     mythic = randint(1, mythic_chance)
     
     if (mythic == 1):
      print(&quot;Oh, you opened a mythic egg? Thats a 0.1% chance! You're incredibly lucky!&quot;)
      mythic = randint(1,3)
      if (mythic == 1 and unicorn == &quot;unopened&quot;):
       companionmulti += 100
       unicorn = &quot;opened&quot;
       print(&quot;You got a unicorn. You get x100 multiplier.&quot;)
      if (mythic == 2 and yeti == &quot;unopened&quot;):
       yeti = &quot;opened&quot;
       moneygain += 3000
       print(&quot;You got a yeti. You get +3000 click power.&quot;)
      if (mythic == 3 and ghoul == &quot;unopened&quot;):
       rebirthmultifr += 5
       ghoul = &quot;opened&quot;
       print(&quot;You got a ghoul. You get x5 rebirth multi.&quot;)
  </code></pre>
  <p>It is completely skipping the <code>if</code> statement usually. I'm not sure why it only works sometimes. If you want to examine the full code, it's here <a href="https://docs.google.com/document/d/1Z_cUipMhrUMrKJylESMOUsQHH12rKt0lvM1C-35FKXo/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/document/d/1Z_cUipMhrUMrKJylESMOUsQHH12rKt0lvM1C-35FKXo/edit?usp=sharing</a>
  There is also a rebirth system which is why the <code>and</code> statement checks if there is a rebirth to open the diamond egg.</p>
  <hr />