This is a python-based slot machine.

# (c)2009 Wolf Halton
# (remove the dashes)
# This code is licensed under the GPL2
# You may use and modify, without warranty of usefulness
import random

def main():
print "++++++++++++++++++++++++++\n\n"
print "Here's a slot machine"
coin = input('how many coins would you like to enter? ')
for i in range (1, (coin + 1)):
print "\n\nThanks For Playing\n\n"

def slots():
choice = raw_input('Would you like to play the slot machine? \n type y if you do ')
if choice == 'y':
for i in range(1, 4):
play = random.randrange(1,16)
print play
print 'Pity, you could have won.'




One comment