Need a little help with creating a game of pig using python.

Game of Pig

import random

print ("Welcome to A Game of Thrones... I mean Pig!")

Human_input = input("Please press 'r'to roll. ")

if Human_input == ('r'):

while True:
    human_roll = random.randint(1,6)

    if human_roll == 1:
        print('Sorry, your turn is over...')
        total = 0

    else print('You have' , human_roll):
        player_cont = input('Do you dare continue? y=yes or n=no')
        human_total = human_roll
        print (human_total)
        human_toal = human_total + human_roll

Its currently looping and keeps rolling the die, but the numbers are not adding together as it goes along.

The directions are as follows: 1. The game of Pig is a simple two player dice game in which the first player to reach 100 or more points wins. Players take turns. On each turn a player rolls a six-sided die. After each roll:

a) If the player rolls a 1 then the player gets no new points and it becomes the other player’s turn.

b) If the player rolls 2-6 then they can either roll again or hold. If the player holds the sum of all rolls is added to their score and the turn passes to the other player.

Write a program that plays the game of Pig where one player is human and the other is the computer. When it is the human’s turn the program should show the score of both players and the previous roll. Allow the human to input “r” for roll again and “h” for hold. (Hint: use the input function).

When it is the computer’s turn you need not do any prompting. Simply keep rolling until the computer has earned 20 or more points and then hold. If the computer rolls a 1 at any time then the turn is lost and no points are added to the score. If at any point the computer has enough points to win the game then the computer holds and the game ends.

Allow the human player to roll first. A random roll can be simulated with a call to random.randint(1,6) which generates a uniform random number in [1,6]. Make sure to import the random module (ie. import random).

I would appreciate any help you can give me. Sorry if the coding is poor haha, I am trying my best!

/r/learnpython Thread