# Let Python roll the dice
# random — generate values you didn't choose

import random

# ─────────────────────────────────────────────
# randint() — a random integer
# ─────────────────────────────────────────────

number = random.randint(1, 10)
print(number)    # different every time

# both ends included — 1 and 10 are possible

# ─────────────────────────────────────────────
# Simulating a dice roll
# ─────────────────────────────────────────────

roll = random.randint(1, 6)
print(f"You rolled: {roll}")

# six possible outcomes — Python picks one

# ─────────────────────────────────────────────
# choice() — pick from a sequence
# ─────────────────────────────────────────────

word = "Bull"
letter = random.choice(word)
print(f"Random letter: {letter}")

# picks one character at random from the string

# ─────────────────────────────────────────────
# random with a for loop
# ─────────────────────────────────────────────

for i in range(5):
    roll = random.randint(1, 6)
    print(f"Roll {i + 1}: {roll}")

# Roll 1: 4
# Roll 2: 1
# Roll 3: 6
# Roll 4: 2
# Roll 5: 5
# — different every run

# ─────────────────────────────────────────────
# Quick reference
# ─────────────────────────────────────────────

# import random              — always at the top of the file
# random.randint(a, b)       — random integer, both a and b included
# random.choice(sequence)    — random item from a sequence
# every run gives different results — that's the point
