repl.it
@Ov3R10rd/

Slot Machine Game

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from random import randint
print "Welcome to the casino! We have a lovely assortment of slot machines! I hope you will try them all! I'll help you get started! +$50(say leave if you want to!)"
cash=50
for x in range(1000):
  print "__________________________________________________"
  if cash==0:
    print "Im sorry, but you don't have enough money to play any machines... :("
    if x==0:
      print "You lasted 1 round!"
      break
    else:
      print "You lasted",x,"rounds!"
    break
  print "Your Cash:",cash,"Turn #",x+1
  choice=raw_input("Super Slots($50), Mega Money($25), Big Bucks($10), or Double Up. ")
  if choice=="Super Slots" and cash>=50:
    cash-=50;
    num1=randint(1,15)
    num2=randint(1,15)
    num3=randint(1,15)
    print num1,num2,num3
    if num1==num2 and num1==num3:
      print "SUPER JACKPOT! +$1000"
      cash=cash+1000
    elif num1==num2 or num1==num3 or num2==num3:
      print "WIN! +$100"
      cash=cash+100
    else:
      print "Better luck next time..."
  elif choice=="Mega Money" and cash>=25:
    cash-=25;
    num1=randint(1,10)
    num2=randint(1,10)
    num3=randint(1,10)
    print num1,num2,num3
    if num1==num2 and num1==num3:
      print "MEGA JACKPOT! +$100"
      cash=cash+100
    elif num1==num2 or num1==num3 or num2==num3:
      print "WIN! +$50"
      cash=cash+50
    else:
      print "Better luck next time..."
  elif choice=="Big Bucks" and cash>=10:
    cash-=10;
    num1=randint(1,5)
    num2=randint(1,5)
    num3=randint(1,5)
    print num1,num2,num3
    if num1==num2 and num1==num3:
      print "BIG JACKPOT! +$50"
      cash=cash+50
    elif num1==num2 or num1==num3 or num2== num3:
      print "WIN! +$20"
      cash=cash+20
    else:
      print "Better luck next time..."
  elif choice=="Double Up":
    num1=randint(1,2)
    print num1
    if num1==2:
      print "DOUBLE UP!"
      cash=cash*2
    else:
      print "Better luck next time!"
      cash=cash-cash
  elif choice=="leave" or choice=="Leave":
    if x==0:
      print "Your Cash:",cash,". You Lasted 1 round, thanks for playing!"
    else:
      print "Your Cash:",cash,". You Lasted",x,"rounds, thanks for playing!"
    break
  elif choice=="283":
    choice2=raw_input("What? ")
    if choice2=="2017":
      choice3=raw_input("I could not hear you... ")
      if choice3=="4-5-18-16":
        cash=cash+10000
        print "Good job! You have discovered one of the hardest easter eggs ever made by me! Well done!"
      else:
        print "Dont enter things you dont understand..."
        break
    else:
      print "Dont enter things that you dont understand..."
      break
  else:
    print "Sorry, we currently do not have any slot machines by that name."