repl.it
@vahrammkhitarya/

casinohypercomand

Python 2.7

creating funny mini casino for school project

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
import time
import random

print 'welcome to Vahram\'s casino777'
time.sleep(1)
print ("1$ = 10gold")
balance = int(raw_input("add money to balance "))
print "so you have"
time.sleep(1)
gold = balance*10 
print gold
print"gold"
amount = gold//5
print "you can play"
print amount
print "times"
print "1 = spinner"
print "2 = roullete"
choice = int(raw_input("enter 1 or 2 "))

def roulette():
  for x in range(amount):
    ran = int(raw_input("enter your number "))
    while ran >36:
      opt = int(raw_input("enter correct number"))
      rand = random.randrange(0, 37)
      print "spinning roulette..."
      time.sleep(2)
      
      if opt == rand:
        print "you won the number was" 
        print rand
        break
      else:
        print "you lost. the number was"
        print rand 
    print "try again" 

def spin3():
  times = int(raw_input("how many times do you want to spin"))
  for y in range(times):
    spin2 = random.randrange(1,8)
    spin1 = random.randrange(1,8) 
    spin = random.randrange(1,8)
    print "spinning"
    time.sleep(1)
    print spin 
    print spin1
    print spin2
    if spin == spin1 == spin2:
      print 'you win' 
      print "your balance is" + balance
    else:
      print "you lost"
      print "try again"
         
if choice ==1:
  roulette()
else:
  spin3()
print "come more"
Fetching token
?