import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from random import randint

data = []

numIter = 1000

for i in range(numIter):
    s = ''

    for j in range(2):
        r = randint(1,6)
        s += str(r)

    while (s[len(s)-1] != '6')  or (s[len(s)-2] != '6') or (s[len(s)-3] != '6') or (s[len(s)-4] != '6'):
        r = randint(1,6)
        s += str(r)

    data.append(len(s))

    print(i/numIter)

avg = sum(data)/len(data)

print(avg)

# plt.plot(data)
038d2ad2372d30b9b52046ff00e8f4b06c9b4fe8
<mask token>

<mask token>
matplotlib.use('TkAgg')
<mask token>
for i in range(numIter):
    s = ''
    for j in range(2):
        r = randint(1, 6)
        s += str(r)
    while s[len(s) - 1] != '6' or s[len(s) - 2] != '6' or s[len(s) - 3
        ] != '6' or s[len(s) - 4] != '6':
        r = randint(1, 6)
        s += str(r)
    data.append(len(s))
    print(i / numIter)
<mask token>
print(avg)

<mask token>
matplotlib.use('TkAgg')
<mask token>
data = []
numIter = 1000
for i in range(numIter):
    s = ''
    for j in range(2):
        r = randint(1, 6)
        s += str(r)
    while s[len(s) - 1] != '6' or s[len(s) - 2] != '6' or s[len(s) - 3
        ] != '6' or s[len(s) - 4] != '6':
        r = randint(1, 6)
        s += str(r)
    data.append(len(s))
    print(i / numIter)
avg = sum(data) / len(data)
print(avg)

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from random import randint
data = []
numIter = 1000
for i in range(numIter):
    s = ''
    for j in range(2):
        r = randint(1, 6)
        s += str(r)
    while s[len(s) - 1] != '6' or s[len(s) - 2] != '6' or s[len(s) - 3
        ] != '6' or s[len(s) - 4] != '6':
        r = randint(1, 6)
        s += str(r)
    data.append(len(s))
    print(i / numIter)
avg = sum(data) / len(data)
print(avg)

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from random import randint

data = []

numIter = 1000

for i in range(numIter):
    s = ''

    for j in range(2):
        r = randint(1,6)
        s += str(r)

    while (s[len(s)-1] != '6')  or (s[len(s)-2] != '6') or (s[len(s)-3] != '6') or (s[len(s)-4] != '6'):
        r = randint(1,6)
        s += str(r)

    data.append(len(s))

    print(i/numIter)

avg = sum(data)/len(data)

print(avg)

# plt.plot(data)