Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.79 KB | None | 0 0
  1. import random
  2. import time
  3.  
  4. cash = 500;
  5.  
  6. def start():
  7.     print "You now have", cash ,"$"
  8.     youwannaplay()
  9.  
  10. def youwannaplay():
  11.     eee = raw_input("Insert 10$ to start (Press enter)")
  12.     if eee == "":
  13.         print '-10 $'
  14.         game()
  15.     elif cash < 10:
  16.         print 'Insufficent money, game over you play-a-holic!'
  17.     else:
  18.         print "Invalid input"
  19.         start()
  20.  
  21. def game():
  22.     global cash
  23.     cash = cash - 10
  24.     time.sleep(float(0.5))
  25.     print 'The wheels begins to roll...'
  26.     time.sleep(float(1.5))
  27.     print "*Wheel One stops*"
  28.     a = random.randint(1,12)
  29.     if a == 1:
  30.         oneOne = "Potatis"
  31.         oneTwo = "Gurka"
  32.         oneThree = "Morot"
  33.     elif a == 2:
  34.         oneOne = "Gurka"
  35.         oneTwo = "Morot"
  36.         oneThree = "Potatis"
  37.     elif a == 3:
  38.         oneOne = "Morot"
  39.         oneTwo = "Potatis"
  40.         oneThree = "Gurka"
  41.     elif a == 4:
  42.         oneOne = "Potatis"
  43.         oneTwo = "Gurka"
  44.         oneThree = "Morot"
  45.     elif a == 5:
  46.         oneOne = "Gurka"
  47.         oneTwo = "Morot"
  48.         oneThree = "Potatis"
  49.     elif a == 6:
  50.         oneOne = "Morot"
  51.         oneTwo = "Potatis"
  52.         oneThree = "Gurka"
  53.     elif a == 7:
  54.         oneOne = "Potatis"
  55.         oneTwo = "Gurka"
  56.         oneThree = "Morot"
  57.     elif a == 8:
  58.         oneOne = "Gurka"
  59.         oneTwo = "Morot"
  60.         oneThree = "Potatis"
  61.     elif a == 9:
  62.         oneOne = "Morot"
  63.         oneTwo = "Potatis"
  64.         oneThree = "Gurka"
  65.     elif a == 10:
  66.         oneOne = "Coin"
  67.         oneTwo = "Gurka"
  68.         oneThree = "Morot"
  69.     elif a == 11:
  70.         oneOne = "Potatis"
  71.         oneTwo = "Coin"
  72.         oneThree = "Morot"
  73.     elif a == 12:
  74.         oneOne = "Potatis"
  75.         oneTwo = "Gurka"
  76.         oneThree = "Coin"
  77.     print "The first row from left to right:",oneOne,",",oneTwo,",",oneThree
  78.  
  79.     time.sleep(float(1.5))
  80.     print "*Wheel Two stops*"
  81.     b = random.randint(1,12)
  82.     if b == 1:
  83.         twoOne = "Potatis"
  84.         twoTwo = "Gurka"
  85.         twoThree = "Morot"
  86.     elif b == 2:
  87.         twoOne = "Gurka"
  88.         twoTwo = "Morot"
  89.         twoThree = "Potatis"
  90.     elif b == 3:
  91.         twoOne = "Morot"
  92.         twoTwo = "Potatis"
  93.         twoThree = "Gurka"
  94.     elif b == 4:
  95.         twoOne = "Potatis"
  96.         twoTwo = "Gurka"
  97.         twoThree = "Morot"
  98.     elif b == 5:
  99.         twoOne = "Gurka"
  100.         twoTwo = "Morot"
  101.         twoThree = "Potatis"
  102.     elif b == 6:
  103.         twoOne = "Morot"
  104.         twoTwo = "Potatis"
  105.         twoThree = "Gurka"
  106.     elif b == 7:
  107.         twoOne = "Potatis"
  108.         twoTwo = "Gurka"
  109.         twoThree = "Morot"
  110.     elif b == 8:
  111.         twoOne = "Gurka"
  112.         twoTwo = "Morot"
  113.         twoThree = "Potatis"
  114.     elif b == 9:
  115.         twoOne = "Morot"
  116.         twoTwo = "Potatis"
  117.         twoThree = "Gurka"
  118.     elif b == 10:
  119.         twoOne = "Coin"
  120.         twoTwo = "Gurka"
  121.         twoThree = "Morot"
  122.     elif b == 11:
  123.         twoOne = "Potatis"
  124.         twoTwo = "Coin"
  125.         twoThree = "Morot"
  126.     elif b == 12:
  127.         twoOne = "Potatis"
  128.         twoTwo = "Gurka"
  129.         twoThree = "Coin"
  130.     print "The second row from left to right:",twoOne,",",twoTwo,",",twoThree
  131.  
  132.     time.sleep(float(1.5))
  133.     print "*Wheel Three stops*"
  134.     c = random.randint(1,12)
  135.     if c == 1:
  136.         threeOne = "Potatis"
  137.         threeTwo = "Gurka"
  138.         threeThree = "Morot"
  139.     elif c == 2:
  140.         threeOne = "Gurka"
  141.         threeTwo = "Morot"
  142.         threeThree = "Potatis"
  143.     elif c == 3:
  144.         threeOne = "Morot"
  145.         threeTwo = "Potatis"
  146.         threeThree = "Gurka"
  147.     elif c == 4:
  148.         threeOne = "Potatis"
  149.         threeTwo = "Gurka"
  150.         threeThree = "Morot"
  151.     elif c == 5:
  152.         threeOne = "Gurka"
  153.         threeTwo = "Morot"
  154.         threeThree = "Potatis"
  155.     elif c == 6:
  156.         threeOne = "Morot"
  157.         threeTwo = "Potatis"
  158.         threeThree = "Gurka"
  159.     elif c == 7:
  160.         threeOne = "Potatis"
  161.         threeTwo = "Gurka"
  162.         threeThree = "Morot"
  163.     elif c == 8:
  164.         threeOne = "Gurka"
  165.         threeTwo = "Morot"
  166.         threeThree = "Potatis"
  167.     elif c == 9:
  168.         threeOne = "Morot"
  169.         threeTwo = "Potatis"
  170.         threeThree = "Gurka"
  171.     elif c == 10:
  172.         threeOne = "Coin"
  173.         threeTwo = "Gurka"
  174.         threeThree = "Morot"
  175.     elif c == 11:
  176.         threeOne = "Potatis"
  177.         threeTwo = "Coin"
  178.         threeThree = "Morot"
  179.     elif c == 12:
  180.         threeOne = "Potatis"
  181.         threeTwo = "Gurka"
  182.         threeThree = "Coin"
  183.     print "The third row from left to right:",threeOne,",",threeTwo,",",threeThree
  184.     print ""
  185.  
  186.     if (oneTwo and twoTwo and threeTwo) == "Potatis":
  187.         print 'You win + 50 $'
  188.         cash = cash + 50;
  189.         start()
  190.     elif (oneTwo and twoTwo and threeTwo) == "Gurka":
  191.         print 'You win + 30 $'
  192.         cash = cash + 30;
  193.         start()
  194.     elif (oneTwo and twoTwo and threeTwo) == "Morot":
  195.         print 'You win + 40 $'
  196.         cash = cash + 40;
  197.         start()
  198.  
  199.     elif (oneOne and twoOne and threeOne) == "Potatis":
  200.         print 'You win + 50 $'
  201.         cash = cash + 50;
  202.         start()
  203.     elif (oneOne and twoOne and threeOne) == "Gurka":
  204.         print 'You win + 30 $'
  205.         cash = cash + 30;
  206.         start()
  207.     elif (oneOne and twoOne and threeOne) == "Morot":
  208.         print 'You win + 40 $'
  209.         cash = cash + 40;
  210.         start()
  211.  
  212.     elif (oneThree and twoThree and threeThree) == "Potatis":
  213.         print 'You win + 50 $'
  214.         cash = cash + 50;
  215.         start()
  216.     elif (oneThree and twoThree and threeThree) == "Gurka":
  217.         print 'You win + 30 $'
  218.         cash = cash + 30;
  219.         start()
  220.     elif (oneThree and twoThree and threeThree) == "Morot":
  221.         print 'You win + 40 $'
  222.         cash = cash + 40;
  223.         start()
  224.    
  225. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement