Last active
August 3, 2022 22:06
-
-
Save daniel-schroeder-dev/773c3fbe5e2dc2aea306088e8d8f2c5c to your computer and use it in GitHub Desktop.
Morra - Kendrick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################## BEGIN FUNCTION DEFINITIONS ###################### | |
from random import randint | |
########################## END FUNCTION DEFINITIONS ###################### | |
game_rules = """ | |
Welcome to Morra! In this game, you'll decide how many fingers | |
to hold up (from one hand) and then the computer will randomly | |
do the same. You'll need to guess the total number of fingers | |
to win the round, before seeing how many fingers the computer | |
has decided to hold up! | |
""" | |
wins = 0 | |
computer_wins = 0 | |
########################## END FUNCTION DEFINITIONS ###################### | |
name = input("what is their name") | |
num_of_rounds = int(input("how many times do you want to play max is 5")) | |
for num in range(1,num_of_rounds + 1): | |
player_choice = int(input("how many fingers do you choose")) | |
computer_choice = randint(1,5) | |
if player_choice < 1 or player_choice > 5: | |
print("no stop answer is over 5 or below 5") | |
continue | |
total_num_fingers = ___ + ___ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment