AMPS | THARC | KE8QZC | SFW | TSW
ORCID iD icon

Return to the class
Problem A: Write a function named max that accepts two float values as arguments and returns the larger of the two values. For instance, if 1.3 and 3.9 are given, then it should return 3.9.

Problem B: (Rock, paper, scissors game) Write a program that lets the user play rock, paper, scissors against the computer. Here is how it should work:
1. A random number between 1 and 3 should be generated at the start of the game. If that number is 1, then the computer will play "rock", if it is 2, then the computer will play "paper", and if it is 3 then the computer will play "scissors" (but do not display this choice to the user).
3. The computer's choice is shown after the user enters their choice.
4. The winner is selected by the following rules: 5. The entire gameplay steps 1 through 3 should be built into a function named
play_game()
. Based on step 4, the function should either print the winner and return a 1 OR it should print "There is a tie" and return a 0. Returning a zero should cause a loop running the game function to be run again until a 1 is returned. (hint: something like
while gamereturn!=1:
	gamereturn=play_game()
is what you want to do here
)

Problem C: Please give a preliminary idea for your major project. In my repsonse to your submission in this homework, I will tell you within Blackboard what you should do next as part of the project. Accomplishing that goal will constitute your first "project homework assignment". If the project is not appropriate, then I will let you know and you will have until the end of the week (6 March) to make another suggestion. If you fail to do that, then I will give you a project and you will have to do that one for the remainder of the semester.