Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help For Slot Machine Code
#2
There are just a few slight changes that need to be made for this to work
coins += reward_dict[match][number] on line 61
and then a little code snippet on line 63
else: #Else statement for the "if match != None:"
    if "dollar" in slots: #I put the if inside the else, in case you plan on adding any more symbols that reward money upon only having one symbol. However, you can also incorporate a dictionary for this to organize the code.
        coins += 1
        print("You got dollar! +1 coin!")
Then get rid of the code on line 67 and 68
Also move the code on lines 70-73 into the if "skull" not in slots: statement.
I have not tested it so hopefully that fixes it.
Reply


Messages In This Thread
Help For Slot Machine Code - by Rayaan - Mar-30-2020, 03:39 AM
RE: Help For Slot Machine Code - by SheeppOSU - Mar-30-2020, 05:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Gui slot machine-out of memory error steve_shambles 12 5,138 May-18-2020, 11:31 PM
Last Post: deanhystad
  run into issues while configuring visual-studio code on a win 7 machine. apollo 3 3,689 Sep-12-2019, 12:25 AM
Last Post: snippsat
  Sending Hex Code to Machine from Laptop using TCP/IP Protocal Brian_Cheong 2 9,731 May-12-2017, 01:01 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020