python slot machine

i tried making a slot machine using python i haven’t finished yet but here is some of the code

def deposit():
    while True:
        amount = input('what would you like to deposit? $')
        if amount.isdigit():
            amount = int(amount)
            if amount > 0:
                break
            else:
                print('amount must be greater than 0')
        else:
            print('please enter a number')
    return amount

this code handles the deposits!!

def main():
    balance = deposit()
    lines = get_number_of_lines()
    print(balance, lines)

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like these