Untitled
Anonymous
plain_text
01/22/2026 2:57 PM
1.1 KB
9
Indexable
import random
import string
import time
categories = [
"Animal",
"Country",
"Food",
"Movie",
"Something you find in a school"
]
letter = random.choice(string.ascii_uppercase)
print("š® CATEGORIES GAME š®")
print(f"Letter: {letter}")
print("You have 30 seconds!\n")
answers = {}
start_time = time.time()
for category in categories:
if time.time() - start_time > 30:
print("\nā° Time's up!")
break
answer = input(f"{category}: ").strip()
answers[category] = answer
# Scoring
score = 0
print("\nRESULTS:")
for category, answer in answers.items():
if answer and answer[0].upper() == letter:
print(f"ā
{category}: {answer}")
score += 1
else:
print(f"ā {category}: {answer}")
print(f"\nFinal Score: {score}/{len(categories)}")
Editor is loading...
Leave a Comment