money = 0 day = 0 traps = 6 weather = 0 Networth = 0 totaltraps = 0 cost = 20 canbuy = 0 import random from random import randint, uniform while traps > 0 and day != 7 : day = day+1 print("Day: ", day) print("Traps: ", traps) print("Credits:", money) print("") probability_rain = round(uniform(0, 1) * 100) probability_clear = 100 - probability_rain selected_weather = 1 if uniform(0, 100) <= probability_rain else 2 print("Chance of Rain:", round(probability_rain, 2), "%") print("Chance of Clear:", round(probability_clear, 2), "%") shallow = int(input("How many traps shallow? ")) if shallow > traps : print("You dont have that many traps!") while shallow > traps : shallow = int(input("How many traps shallow? ")) if shallow > traps : print("You dont have that many traps!") deep = int(input("How many traps deep? ")) if deep > traps : print("You dont have that many traps!") while deep > traps : deep = int(input("How many traps deep? ")) if deep > traps : print("You dont have that many traps!") if selected_weather == 1 : print("It rained!") traps = traps - deep deep = 0 else: print("It was clear!") money = money + (deep * 20) money = money + (shallow * 10) print("You earned:", (shallow * 10)+(deep*20), "and now have:", money, "Credits left") shop = str(input("Would you like to enter the shop? y/n ")) if shop == "y" : print() print("You have:", money, "Credits left!") print() print("Traps are:", cost, "each.(+2 every purchase)") print() canbuy = min(money // cost, int(money / cost)) print(canbuy) print("You can afford:", canbuy) trapbuy = int(input("How many traps would you like to trapbuy?" )) if money < cost*trapbuy : print("your too broke!") else: if trapbuy != 0 : money = money - (cost*trapbuy) traps = traps+trapbuy cost = cost + (2*trapbuy) totaltraps = totaltraps + trapbuy print(" ") print("-------------------------------------------") print(" ") Networth = Networth + money print("No more traps left!") print(" ") print("Total money gained:", Networth) print(" ") print("Total traps bought:", totaltraps) print(" ") print("Total days fishing:", day) print(" ") print("-------------------------------------------") print(" ")