import random
from game_utils import ask_for_choice, prompt_yes_no
def play_animal_game():
choices = ['cow', 'dog', 'horse', 'cat', 'bird']
choice = random.choice(choices)
animal = ask_for_choice(
"Which animal am I thinking of between " + ", ".join(choices) + "? ", choices)
if animal == choice:
print("Yes! It was " + choice + "!")
else:
print("No! It was " + choice + "!")
again = True
while again:
play_animal_game()
again = prompt_yes_no('Would you like to play again (y/n)? ')
print("Goodbye!")
"git@gitlab.caltech.edu:cs24-19fa/git_rec_nano.git" did not exist on "0d1381adf9666e11bfaa6379549bc81cb2328e72"
-
Adam Blank authoredc8eb8152