Dear all,
This is going to be an make-up exercise for quiz-1. Your quiz 1 grade will be maximum of quiz 1 and make-up exam: max(quiz-1, make-up)
.
Again you will create a game. You can help each other but do not upload the same codes with your friend. It is going to be treated as cheating
. I recommend you try to do it by yourself until last day. You can google for Python Rock-Paper-Scissors algorithms from the internet but all will require some specific features for the game. Be careful about the details. Do not copy paste the scripts on the internet.
Game is Rock-Paper-Scissors
. I think you are familiar with the rules:
def game(*arg):
if len(arg) == 1:
# 1-Player Game
p1 = arg[0] #player-1's game
p2 = None # IMPORTANT: replace None with a random choice between rock papers and siccors
elif len(arg) == 2:
# 2-Player Game
p1 = arg[0] #player-1's game
p2 = arg[1] #player-2's game
else:
print('You should give 1 argument for 1-Player and 2 for 2-Players')
return None # If there are more than 2 arguments than function will stop by `return`
# Start coding the game from here
# Start coding the game from here
# Start coding the game from here
game('Rock')
Tie!
game('Rock')
Player 1 Win!
game('Rock')
Computer Win!
game('Rock','Rock')
Tie!
game('Rock','Paper')
Player 2 Wins!
game('Rock', 'Scissors')
Player 1 Wins!
Good luck!