In [ ]:
import random
print("Welcome to the fishing game.")
print("You are going to be fishing at a pond.")
print("Here are the rules to play.")
print("Each of the players have to catch a fish")
print("If you don't catch a fish, then your turn is over. It is the other player turn to go. If they don't catch a fish, then it keeps repeating.")
print("It keeps going until one of the players catch more fish than you.")
print("In order to win you have to catch a certain fish because all the fish has a certain weight. You should go for the heigher weight so you can win the game. ")
player1 = input("Player1, what is your name?")
player2 = input("Player2, what is your name?")
def playing():
player1_score = 0
player2_score = 0
playing()
def fishing_game():
global score
global fish
while playing:
if player1 == 'Catfish = 15':
if player2 == 'Koi Fish = 5':
print("Player2_score: {}". format(player2_score))
player1 += 1
print("your score: {}".format(player2_score))
print("player1_score: {}".format(player_score1))
continue
if player1 == 'Catfish = 15':
print("player2_score: {}".format(player2_score))
player1_score += 1
print("your score: {}".format(player1_score))
print("player2_score: {}".format(player2_score))
continue
elif player1 == 'Grassy Carp - 8':
if player2 == 'Shad - 10':
print("player2_score: {}".format(player2_score))
player2_score += 1
print("your score: {}".format(player1_score))
print("player2_scorescore: {}".format(player2_score))
continue
if player1 == 'Shad - 10':
print("player1_score: {}".format(player1_score))
player1_score += 1
print("your score: {}".format(player1_score))
print("player2_score : {}".format(player2_score))
continue
elif player1 == 'Crappy - 8':
if player2 == 'Guppy Gurus ':
print("player2_score: {}".format(player2_score))
player2_score += 1
print("your score: {}".format(player1_score))
print("player2_score: {}".format(player2_score))
continue
if player1_score =='Crappy - 8':
print("player2_score: {}".format(player2_score))
player1_score += 1
print("Your score: {}".format(player1_score))
continue
elif player1 == 'Guppy Gurus = 2':
if player2 == 'Koi Fish = 5':
print("Player2_score: {}". format(player2_score))
player1 += 1
print("your score: {}".format(player2_score))
print("player1_score: {}".format(player_score1))
continue
if player1 == 'Catfish = 15':
print("player2_score: {}".format(player2_score))
player1_score += 1
print("your score: {}".format(player1_score))
print("player2_score: {}".format(player2_score))
continue
def catch_fish():
fish = random.choice(fish)
print("Player1, caught a fish.", fish)
player2_fish = random.choice(fish)
print("Player2, caught a fish.", player2_fish)
catch_fish()
def types_fish():
fish = ['Catfish = 15', 'Koi Fish = 5', 'Grass Carp = 8', 'Shad = 10', 'Crappy = 8','Guppy Gurus = 2', "none"]
Weight = ['40-51','35','55','12', '3.3','12','9.7' ]
spot = ['pond']
player = {}
print(fish)
print(Weight)
types_fish()
def exit():
exitAnswer = input("Do you want to go again? Y or N?")
if exitAnswer == "Y" or exitAnswer == "y":
fishing_game()
elif exitAnswer == "N"or exitAnswer == "n":
print("Have an amazing day!!!")
print("Thank you so much for playing!!!")
exit()
Welcome to the fishing game. You are going to be fishing at a pond. Here are the rules to play. Each of the players have to catch a fish If you don't catch a fish, then your turn is over. It is the other player turn to go. If they don't catch a fish, then it keeps repeating. It keeps going until one of the players catch more fish than you. In order to win you have to catch a certain fish because all the fish has a certain weight. You should go for the heigher weight so you can win the game. Player1, what is your name?b Player2, what is your name?a ['Catfish = 15', 'Koi Fish = 5', 'Grass Carp = 8', 'Shad = 10', 'Crappy = 8', 'Guppy Gurus = 2', 'none'] ['40-51', '35', '55', '12', '3.3', '12', '9.7'] Do you want to go again? Y or N?n Have an amazing day!!! Thank you so much for playing!!! ['Catfish = 15', 'Koi Fish = 5', 'Grass Carp = 8', 'Shad = 10', 'Crappy = 8', 'Guppy Gurus = 2', 'none'] ['40-51', '35', '55', '12', '3.3', '12', '9.7'] Do you want to go again? Y or N?y ['Catfish = 15', 'Koi Fish = 5', 'Grass Carp = 8', 'Shad = 10', 'Crappy = 8', 'Guppy Gurus = 2', 'none'] ['40-51', '35', '55', '12', '3.3', '12', '9.7']
In [ ]: