Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2014
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.06 KB | None | 0 0
  1. #!/usr/bin/python3.3
  2. '''
  3. Author: Jupiterlyght
  4. Syntax: Python 3.3
  5. Original Filename: cointoss.py
  6. Summary: A text-based cointoss program for making decisions and whatnot.
  7.  
  8. Run this in Terminal for now. Might have a better version later.
  9. Feel free to report bugs or suggestions at jbr0131@outlook.com
  10.  
  11. '''
  12. import random
  13. class cointoss:
  14.     def __init__(self):
  15.         options = ["heads", "tails"]
  16.         bools = [True, False]
  17.         snarkiness = ["I don't give a fock Mode",
  18.                       "Don't have time for this Mode",
  19.                       "Meh Mode","The idiot who programmed this didn't specifically list my kind of Cointoss Mode Mode"]
  20.         rSnarky = (random.choice(snarkiness))
  21.         result = (random.choice(bools))
  22.        
  23.         print("Precise Cointoss (v 1.0)\n")
  24.         typeQuery = input("Set Type:\n\nObject Specific = A\nTrue or False = B\nIt Doesn't Matter = C\n\n")
  25.         if typeQuery == "a":
  26.             # Object Specific - A or B
  27.             rootQuery = input("Using Object Specific Mode\nHeads or Tails ")
  28.             if rootQuery == options[0]:
  29.                 print("You rooted ", options[0])
  30.                 print("The Result:\n")
  31.                 if result:
  32.                     print("Object X (first object in consideration) is the Victor")
  33.                 else:
  34.                     print("Object Y (second object in consideration) is the Victor")
  35.             if rootQuery == options[1]:
  36.                 print("You rooted ", options[1])
  37.                 print("The Result:\n")
  38.                 if not result:
  39.                     print("Object Y (second object in consideration) is the Victor")
  40.                 else:
  41.                     print("Object X (second object in consideration) is the Victor")
  42.         if typeQuery == "b":
  43.             # True or False
  44.             rootQuery = input("Using True or False Mode\nHeads or Tails? ")
  45.             if rootQuery == options[0]:
  46.                 print("You rooted ", options[0])
  47.                 print("The Result:\n")
  48.                 if result:
  49.                     print("Heads - True!")
  50.                 else:
  51.                     print("Tails - False!")
  52.             if rootQuery == options[1]:
  53.                 print("You rooted ", options[1])
  54.                 print("The Result:\n")
  55.                 if not result:
  56.                     print("Tails - False!")
  57.                 else:
  58.                     print("Heads - True!")
  59.         if typeQuery == "c":
  60.             # Doesn't Matter
  61.             print("Using", rSnarky)
  62.             rootQuery = input("\nHeads or Tails? ")
  63.             if rootQuery == options[0]:
  64.                 print("You rooted ", options[0])
  65.                 print("The Result:\n")
  66.                 if result:
  67.                     print("Heads")
  68.                 else:
  69.                     print("Tails")
  70.             if rootQuery == options[1]:
  71.                 print("You rooted ", options[1])
  72.                 print("The Result:\n")
  73.                 if not result:
  74.                     print("Tails")
  75.                 else:
  76.                     print("Heads")
  77. cointoss()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement