# import the random module to be able to get a random number for the computer's choice # Assign a variable to hold the total number of marbles, start it at 17 # Assign a varibale that will keep track of whose turn it is, start it either as comp or user # Print the welcome to the game message # Print the number of marbles in the jar message # Start a while loop, use the variable that holds the total number of marbles, and keep the loop going until it gets to 0 or below # check if the turn is set to comp or user # if it is comp # assign a variable to hold the computer's choice, use random.randint(1,3) to get a random # between 1 and 3 # print the computer removed # marbles message # switch the turn to user # if the turn is user # assign a variable to hold the user's choice, and ask the user to choose a # from 1 to 3 # now check if the users choice is less than 1 or greater 3 than # use a while loop, and the 'or' operator, or a list [1,2,3] with the 'not in' operator # if the choice is outside of the range assign the variable to a new input asking the user to keep the value between 1 and 3 # print You removed # marbles message # switch the turn to comp # After this if else statement, we have a choice of marbles to remove # Subtract the choice from the total number of marbles # Print there are # marbles left in the jar # The while loop exits here when the number of marbles reaches 0 # Now we need to check who won (who took the last the turn?) if turn == #blank: print('User wins!') else: print('Comp wins!')