Functions and List Index Out Of Range
<p>I'm working on a simple yahtzee style dice game for class but I keep running into issues. Namely right now I'm having an issue with lists. I keep getting </p>

<pre><code>  File "C:/Users/u1069284/Desktop/HW3_LandonShoaf.py", line 90, in scoring
    counts[value] = counts[value] + 1

IndexError: list index out of range
</code></pre>

<p>when I run my program. I'm not sure  please help?</p>

<pre><code>    from math import *
    from random import *
    global PlayerScore
    PlayerScore = 100

def firstroll():

    global dice
    dice = [0,0,0,0,0]
    print(dice)

    for Index in range(5):
            dice[Index] = randint(1,6)
    print(dice)
    return(dice)
def reroll():
    rerollstring = input("Which die/dice do you want to reroll?: ")
    print(rerollstring)

    rerolllist = rerollstring.split()

    print(rerolllist)

    for i in rerolllist:
        dice[int(i) - 1] = randint(1,6)
    print(dice)
    return(dice)
def scoring():

    global dice
    counts = [] * 7
    for value in dice:
        counts[value] = counts[value] + 1

    if 5 in counts:
        message = "Five Of A Kind! +30 Points!"
        score = 30
    elif 4 in counts:
        message = "Four Of A Kind! +25 Points!"
        score = 25
    elif (3 in counts) and (2 in counts):
        message = "FULL HOUSE! +15 Points!"
        score = 15
    elif 3 in counts:
        message = "Three Of A Kind! +10 Points!"
        score = 10
    elif counts.count(2) == 2:
        message = "Two Pairs! +5 Points"
        score = 5
    elif  not (2 in counts) and (counts[1] == 0 or counts[6] == 0):
        message = "Straight! +20 Points!"
        score = 20
    else:
        message = "NO POINTS!"
        score = 0
    return(score)  
    print(message)
def PlayerScoring():
    PlayerScore == PlayerScore - 10
    PlayerScore == PlayerScore + score
    return(PlayerScore)
    print(PlayerScore)
def want2play():
    play = input("Play the dice game? (y for yes): ")

    return play
def main():
    while True:
        if int(PlayerScore) &gt; 0:
            playround = want2play()
            if playround == 'y':
                firstroll()
                reroll()
                scoring()
                PlayerScoring()
            else:
                print("Game Over")
                break
        else:
            print("Your Are Out Of Points!")
            print("GAME OVER")
main()
</code></pre>

<p>Try this : </p>

<pre><code>counts = [0]*7
for value in dice:
    counts[value] += 1
</code></pre>

python