File size: 467 Bytes
73fbc5b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# core/topic_selector.py ----------------------------------------
class TopicSelector:
def __init__(self):
self.topics = [
"Photosynthesis",
"Newton's Laws",
"Python Loops",
"The Water Cycle"
]
def select(self):
print("Topics:")
for i, t in enumerate(self.topics):
print(f"{i+1}. {t}")
idx = int(input("Choose topic: ")) - 1
return self.topics[idx]
|