mrwanoubaba
Repositories
Issues
Comments
Results
1
issues of
mrwanoubaba
import random # list of possible fish to catch fish = ["trout", "salmon", "bass", "catfish", "tuna"] # player starts with 3 fishing trips trips = 3 while trips > 0: print("You have", trips, "fishing trips left.") print("You cast your line and wait...") # randomly choose a fish from the list to catch catch = random.choice(fish) # player has a 50% chance of catching a fish if random.randint(0, 1) == 1: print("You caught a", catch + "!") else: print("You didn't catch anything. Better luck next time.") # player loses one fishing trip trips -= 1 print("You're out of fishing trips. Come back soon!")