-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
57 lines (48 loc) · 1.99 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import random
def generate_random_personality():
# Define categories of traits
personalities = [
"Cheerful", "Brooding", "Curious", "Charming", "Hot-headed",
"Mysterious", "Optimistic", "Pessimistic", "Sarcastic", "Loyal"
]
occupations = [
"Inventor", "Merchant", "Detective", "Soldier", "Healer",
"Artist", "Farmer", "Scholar", "Explorer", "Thief"
]
quirks = [
"Always hums a tune", "Obsessed with symmetry", "Afraid of cats",
"Constantly loses things", "Speaks in riddles", "Collects strange artifacts",
"Refuses to wear shoes", "Laughs at inappropriate times",
"Carries a lucky charm", "Overuses metaphors"
]
strengths = [
"Brilliant strategist", "Master of disguise", "Incredible strength",
"Photographic memory", "Unwavering courage", "Expert tracker",
"Exceptional cook", "Natural leader", "Gifted storyteller",
"Knack for finding hidden things"
]
weaknesses = [
"Trusts too easily", "Afraid of heights", "Impulsive decision-making",
"Overly competitive", "Terrible liar", "Reckless in danger",
"Shy in social settings", "Struggles with authority",
"Easily distracted", "Fear of the dark"
]
# Randomly select one trait from each category
personality = random.choice(personalities)
occupation = random.choice(occupations)
quirk = random.choice(quirks)
strength = random.choice(strengths)
weakness = random.choice(weaknesses)
# Format and return the character's personality profile
profile = (
f"Personality: {personality}\n"
f"Occupation: {occupation}\n"
f"Quirk: {quirk}\n"
f"Strength: {strength}\n"
f"Weakness: {weakness}"
)
return profile
# Generate and display a random character personality
if __name__ == "__main__":
print("--- Random Character Personality ---")
print(generate_random_personality())