I am creating a python program, but I can’t figure out how to show all the results for the game the player has played at the end.
what I want to do is, at the end of the game when the player finishes all of their rounds, there should be a table or anything that shows if they’ve won or lost each round. If anyone knows how to do it, please reply!!
import random
print("going to play lookthere game!up,down,right,left will be 0, 1, 2, 3")
s= "correct!"
k= "wrong!"
M = "look at there!!"
N = int(input("enter how many games you want to play"))
def lookthere_game():
num = random.randint(0,3)
for i in range (N):
if i < N-1:
print("the",i + 1,"battle!")
ipt = int(input("up is 0,down is 1,left is 2,right is3"))
else:
ipt = int(input("final game. up is 0,down is 1,left is 2,right is3"))
if ipt == num:
print(M,s,"player chose",ipt,”and, computer chose",num)
else:
print(M,k,"player chose",ipt,”and, computer chose",num)
while(not lookthere_game()):
ipt = input("press 0 to end, other to continue")
if ipt == "0":
break