Question: I have these two sections of code and they wont work the way i want them too. I was wondering if someone can help find



I have these two sections of code and they wont work the way i want them too. I was wondering if someone can help find the issue and where to put them
#Dane Connor #DRDL1H # import random #Ask Name name=input("enter the name : ") print("Hello, happy holidays!,",(name), ",Let's try the dreidel game!" ) #Explain Num, Gimel Hey or shin print(' ') print ("Gimel = Win the whole pot") print ("Hey = Win half the pot") print ("Shin = Put one of your gelt in the pot") print ("Nun = No change, spin again") #Tell amount of money bank=10 comBank=10 print(' ') print ("You currently have " , int(bank)," pieces") print ("I currently have " , int(comBank), " pieces") #Putting in 3 pieces pot = 0 print("The pot current has",int(pot),"pieces") print(' ') print("Taking 3 of your pieces and putting them and in the pot") bank=int((bank-3)) print("You now have:" ,int(bank)," remaning") pot=int((pot+3)) print("The pot now has:" ,int(pot)) comBank=int((comBank-3)) print("I will now put 3 of my pieces:" ,(comBank), " remaning") pot=int((pot)+3) print("The pot now has:" ,int((pot))) #Tells User what they got #Repeat Playing #Rolling print(' ') print ("Spinning...") roll = random.randint(1,4) print(' ') print("You rolled:",int(roll)) print("Let's play!") if roll == 1: dreidel = ('gimel') print("gimel") print(' ') bank=int(bank)+int((pot)) pot=int(pot-pot) print("Congrats, You get the whole pot!") elif roll == 2: dreidel = ('hey') print("hey") print(' ') pot=int(pot/2) bank=int(bank)+ int(pot) print("You get half of the Pot!",int(bank)) #I don't know how to fix the error for number two elif roll ==3: dreidel = ('shin') print("shin") print("That's to bad :(") bank=int(bank-1) print("You have:",(int(bank)),"Pieces") pot=int(pot+1) print("The pot now has:",int((pot)),"Pieces") elif roll ==4: drediel = ('nun') print("nun") print("didn't win, didn't lose!:",int(bank),"Pieces") if pot==0: print("The pot is out of money, Let's add 3 pieces each!") pot=int(pot)+6 bank=int(bank)-3 comBank=int(comBank)-3 print(' ') print("The pot has:", int(pot), "Pieces") print("Now I will roll") print ("Spinning...") roll = random.randint(1,4) print(' ') print("I rolled:",int(roll)) print(' ') if roll == 1: dreidel = ('gimel') print("gimel") print(' ') comBank=int(comBank)+int((pot)) pot=int(pot-pot) print("The pot is now:",int(pot)) print("I got the whole pot!") #put wrong variable elif roll == 2: dreidel = ('hey') print("hey") print(' ') comBank=int(comBank)+ int(pot/2) print("I got half of the Pot! and have:",int(comBank)) elif roll ==3: dreidel = ('shin') print("shin") print("That's to bad :(") comBank=int(comBank-1) print("I have:",int(comBank),"Pieces") pot=int(pot+1) print("The pot now has:",int(pot)) elif roll ==4: drediel = ('nun') print("nun") comBank=int(comBank) print("didn't win, didn't lose!:",int(comBank),"Pieces") if pot==0: pot=int(pot+6) bank=int(bank-3) comBank=int(comBank-3) Redo=5 while Redo== 5: choice = input("Want to play again?") if choice =='no' or choice=='No' or choice=='n' or choice=='N' or choice=='nay' or choice=='Nay': break elif choice=='yes' or choice=='Yes' or choice=='y' or choice=='Y' or choice=='yea' or choice=='Yea': print(' ') print ("Spinning...") roll = random.randint(1,4) print(' ') print("You rolled:",int(roll)) print("Let's play!") if roll == 1: dreidel = ('gimel') print("gimel") print(' ') bank=int(bank)+int((pot)) pot=int(pot-pot) print("The pot is now:",int(pot)) pot = 0 print("Congrats, You get the whole pot!") elif roll == 2: dreidel = ('hey') print("hey") print(' ') pot=int(pot/2) bank=int(bank)+ int(pot) print("You get half of the Pot!",int(bank)) #I don't know how to fix the error for number two elif roll ==3: dreidel = ('shin') print("shin") print("That's to bad :(") bank=int(bank-1) print("You have:",(int(bank)),"Pieces") pot=int(pot+1) print("The pot now has:",int((pot)),"Pieces") elif roll ==4: drediel = ('nun') print("nun") print("didn't win, didn't lose!:",int(bank),"Pieces") print(' ') print("The pot has:", int(pot), "Pieces") print("Now I will roll") print ("Spinning...") roll = random.randint(1,4) print(' ') print("I rolled:",int(roll)) print(' ') if roll == 1: dreidel = ('gimel') print("gimel") print(' ') comBank=int(comBank)+int((pot)) pot=int(pot-pot) print("The pot is now:",int(pot) pot == 0 print("I got the whole pot!") #put wrong variable elif roll == 2: dreidel = ('hey') print("hey") print(' ') comBank=int(comBank)+ int(pot/2) print("I got half of the Pot! and have:",int(comBank)) elif roll ==3: dreidel = ('shin') print("shin") print("That's to bad :(") comBank=int(comBank-1) print("I have:",int(comBank),"Pieces") pot=int(pot+1) print("The pot now has:",int(pot)) elif roll ==4: drediel = ('nun') print("nun") comBank=int(comBank) print("didn't win, didn't lose!:",int(comBank),"Pieces") if bank==0: print("You bank has zero you can't play") break if pot==0: pot=int(pot+6) print("The pot has:",int(pot)) bank=int(bank-3) print("I took 3 pieces from you") comBank=int(comBank-3) print("I took 3 pieces from myself")
print("That's to bad :(" comBank=int (comBank-1) print("I have:", int (comba pot=int (pot+1) print ("The pot now has: " elif roll ==4: drediel = ('nun') print ("nun") comBank=int (comBank) print("didn't win, didn't if bank==0: print("You bank has zero if pot==0: I potrint (pot+6) print ("The pot has:", int (pot)) bank=int (bank-3) print("I took 3 pieces from you") comBank=int (comBank-3) print("I took 3 pieces from myself") 1 2 3 4 5 6 if banku=0: print("Your bank have zero, so you cannot play") break Concert Cler.com Download Connor DROLITH D 09.11 Tule Edit Format Run Option Window Help 150 print("The pot han intipot), lec) 15 print("Now I vill roll) 156 print ("Spinning..." 157 roll - random.candint (1.4) print('') print(" rolled ".int troll)). 100 printn't roll: dreidel - I'm print("gime) print(" ') comBankent (coliank) +int(pot)) potwintipot-pot) print("The pos is now: ", int (pot) poto 36 print("I got the whole pot put wong variable 110 wilt roll = 2: dreidel = (hey' 122 print (hey" print(" ") 174 combank int(conBank) + int (pot/2) 173 print("I got half of the potr and have". Intcombank) 170 toll 177 dreidel (shin' print("obin) print("That's to bad :) comBank-in (comBank-1) print("I have, int combank). "Pieces) pat-intpot+1) print("The pot now bas..int (pot) toll - dredielan) print("hun" contan cint(comBank) print taidn't win, didn't loset..int (comBank), "pieces) 191 peint "tou bank has zero you can't play") 1 12 pot potwint (pot.6) urint the pot asa. Intipot)) Dancin bani-3) print("I took 3 pieces from you contoint icon-3) print(" to pieces from syst) 1995 137 19 200 SO 02 comber Wheelcom Download Connor ORDLITHD (19.1) e Edit format the poor Window Help TE 120 129 130 choice - input want to play again?") choice no choice='No' or choices or choice or choice inay it choice'yes' or choice-'Yes' choice-ty' or choice of choice'ye print(' ') print (Opining...) roll - randomrandint(1, 4) print( ") print("you rolledt", int (roll) print("Let's play!") toll 1: dreidel - ('gimel print("imel) print(" ") bankint(bank) +int (pot)) pot int(pot-pot) print("the pot is now: ".int (pot)) pot = 0 print "CongratsYou get the whole pot!) troll-2 dreidel = (hey') print("hey") print(" ") potwint (pot/2) bankint (bank) int (pot) print("You get half of the Pott".int (bank)) I don't know how to fix troll -3: dreidel - (shin' print("sin") print("That's to bad :) bankint bank-1) print("You have:", tint (bank)). "Pieces) potuint ipot+1) print("The pot now has: ".int(ipot)). "Pieces") 135 La 140 142 143 145 140 147 14 159 15: 153 154 155 150 15 150 150 drediel - (sun' print("un") print("didn't win, didn't loseta.int (bank)."Pieces") print(" ') printi"the pot has, int ipot). "Pieces") print"ow I will roll print Spinning..." roll - randomrandint (1.4) print) print(" rolled introll) roll 1: dreidel = 'giael's print iginel) LO 14 print("That's to bad :(" comBank=int (comBank-1) print("I have:", int (comba pot=int (pot+1) print ("The pot now has: " elif roll ==4: drediel = ('nun') print ("nun") comBank=int (comBank) print("didn't win, didn't if bank==0: print("You bank has zero if pot==0: I potrint (pot+6) print ("The pot has:", int (pot)) bank=int (bank-3) print("I took 3 pieces from you") comBank=int (comBank-3) print("I took 3 pieces from myself") 1 2 3 4 5 6 if banku=0: print("Your bank have zero, so you cannot play") break Concert Cler.com Download Connor DROLITH D 09.11 Tule Edit Format Run Option Window Help 150 print("The pot han intipot), lec) 15 print("Now I vill roll) 156 print ("Spinning..." 157 roll - random.candint (1.4) print('') print(" rolled ".int troll)). 100 printn't roll: dreidel - I'm print("gime) print(" ') comBankent (coliank) +int(pot)) potwintipot-pot) print("The pos is now: ", int (pot) poto 36 print("I got the whole pot put wong variable 110 wilt roll = 2: dreidel = (hey' 122 print (hey" print(" ") 174 combank int(conBank) + int (pot/2) 173 print("I got half of the potr and have". Intcombank) 170 toll 177 dreidel (shin' print("obin) print("That's to bad :) comBank-in (comBank-1) print("I have, int combank). "Pieces) pat-intpot+1) print("The pot now bas..int (pot) toll - dredielan) print("hun" contan cint(comBank) print taidn't win, didn't loset..int (comBank), "pieces) 191 peint "tou bank has zero you can't play") 1 12 pot potwint (pot.6) urint the pot asa. Intipot)) Dancin bani-3) print("I took 3 pieces from you contoint icon-3) print(" to pieces from syst) 1995 137 19 200 SO 02 comber Wheelcom Download Connor ORDLITHD (19.1) e Edit format the poor Window Help TE 120 129 130 choice - input want to play again?") choice no choice='No' or choices or choice or choice inay it choice'yes' or choice-'Yes' choice-ty' or choice of choice'ye print(' ') print (Opining...) roll - randomrandint(1, 4) print( ") print("you rolledt", int (roll) print("Let's play!") toll 1: dreidel - ('gimel print("imel) print(" ") bankint(bank) +int (pot)) pot int(pot-pot) print("the pot is now: ".int (pot)) pot = 0 print "CongratsYou get the whole pot!) troll-2 dreidel = (hey') print("hey") print(" ") potwint (pot/2) bankint (bank) int (pot) print("You get half of the Pott".int (bank)) I don't know how to fix troll -3: dreidel - (shin' print("sin") print("That's to bad :) bankint bank-1) print("You have:", tint (bank)). "Pieces) potuint ipot+1) print("The pot now has: ".int(ipot)). "Pieces") 135 La 140 142 143 145 140 147 14 159 15: 153 154 155 150 15 150 150 drediel - (sun' print("un") print("didn't win, didn't loseta.int (bank)."Pieces") print(" ') printi"the pot has, int ipot). "Pieces") print"ow I will roll print Spinning..." roll - randomrandint (1.4) print) print(" rolled introll) roll 1: dreidel = 'giael's print iginel) LO 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
