awacke1 commited on
Commit
f5c1090
Β·
verified Β·
1 Parent(s): 61f3e06

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +174 -0
app.py ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.markdown("""
4
+ Teaching a baby gecko poetry can be a fun and rewarding experience. You can start by reading poems out loud to the baby gecko, choosing simple and rhythmic poems that they can easily follow along with. You can also try reciting short poems to them regularly, which can help them become familiar with the sounds and rhythms of poetry.
5
+
6
+ Additionally, you can create a comfortable and peaceful environment for the baby gecko to listen to poetry. Consider playing soft music or creating a calming atmosphere to enhance their learning experience.
7
+
8
+ Remember to be patient and consistent in your efforts to teach the baby gecko poetry. With time and practice, they may start to show an interest in poetry and even begin to mimic the sounds and rhythms they hear. Enjoy this special bonding experience with your baby gecko as you explore the world of poetry together!
9
+
10
+ # Baby Gecko Learns Poetry Word Game
11
+
12
+ Introduction
13
+ In this whimsical and educational word game, players will embark on a delightful journey with Baby Gecko as they learn poetry through fun challenges and wordplay. As an expert storyteller and word game creator, my inner dialog is buzzing with creativity to bring this game to life!
14
+
15
+ Game Features
16
+ 1. πŸ“œ Rules
17
+ Description: The official guidelines that govern the gameplay and objectives of the word game.
18
+
19
+ 2. ⏰ Time Limit
20
+ Description: A constraint on the duration allowed for players to complete their turns or the entire game.
21
+
22
+ 3. 🎲 Dice
23
+ Description: Used in some word games to randomly determine letter selection or point values.
24
+
25
+ 4. πŸ“š Dictionary
26
+ Description: A reference book used to validate the legitimacy of words formed by players.
27
+
28
+ 5. πŸ”  Alphabet
29
+ Description: The set of letters used to construct words in the game, often with varying point values.
30
+
31
+ 6. πŸ”„ Turn
32
+ Description: The opportunity for each player to form words or perform actions as per the game rules.
33
+
34
+ 7. 🧩 Board
35
+ Description: The playing surface on which letter tiles are placed to form words in certain word games.
36
+
37
+ 8. πŸ” Challenge
38
+ Description: An action that allows players to contest the validity of words formed by their opponents.
39
+
40
+ 9. πŸ’° Score
41
+ Description: Points earned by players for forming valid words, often based on letter values and word length.
42
+
43
+ 10. ❌ Pass
44
+ Description: An option for players to skip their turn if unable to form a word, sometimes with penalties.
45
+
46
+ Storyline
47
+ Once upon a time in the lush jungle, Baby Gecko found a mysterious book of poetry. Eager to learn, Baby Gecko decided to embark on a poetic adventure with friends. Each friend represented a different aspect of language - Grammar Gorilla, Vocabulary Vulture, and Syntax Sloth.
48
+
49
+ Gameplay
50
+ Players will take turns rolling the poetic dice, which will determine the letters they can use to form words. The board will be a magical forest where players place their word tiles to create beautiful poems. Each turn, players can challenge each other's words for extra fun!
51
+
52
+ Objective
53
+ The objective of the game is to help Baby Gecko and friends learn poetry by forming words, creating rhymes, and exploring the wonders of language. Players will earn points based on the complexity and creativity of their poems.
54
+
55
+ Conclusion
56
+ With the combination of storytelling, wordplay, and poetry, Baby Gecko Learns Poetry is a delightful game that will not only entertain but also enhance players' language skills. Join Baby Gecko and friends on this enchanting journey through the world of words!*
57
+
58
+ """)
59
+
60
+ import streamlit as st
61
+ import random
62
+
63
+ # Feature 1: 🐍 Python
64
+ def python_feature():
65
+ st.header("🐍 Python Feature")
66
+ st.write("Python is a high-level programming language known for its simplicity and readability.")
67
+
68
+ # Feature 2: πŸ“œ String
69
+ def string_feature():
70
+ st.header("πŸ“œ String Feature")
71
+ st.write("String is a data type used to represent text, essential for handling words in a word game.")
72
+
73
+ # Feature 3: 🎲 Random
74
+ def random_feature():
75
+ st.header("🎲 Random Feature")
76
+ random_number = random.randint(1, 6)
77
+ st.write(f"Randomly generated number: {random_number}")
78
+
79
+ # Create UI for each feature
80
+ st.title("Baby Gecko Learns Poetry Word Game")
81
+ python_feature()
82
+ string_feature()
83
+ random_feature()
84
+
85
+
86
+
87
+ # Try harder! (calling claude 3 to help w next part..)
88
+
89
+ import streamlit as st
90
+ import random
91
+ import string
92
+
93
+ st.title("Baby Gecko Learns Poetry Word Game")
94
+
95
+ # Feature 1: πŸ“œ Rules
96
+ st.header("πŸ“œ Rules")
97
+ st.write("Form words using the given letters within the time limit.")
98
+ st.write("Earn points based on the length and complexity of the words.")
99
+ st.write("Challenge opponents' words to gain extra points.")
100
+
101
+ # Feature 2: ⏰ Time Limit
102
+ time_limit = 60
103
+ st.header(f"⏰ Time Limit: {time_limit} seconds")
104
+
105
+ # Feature 3: 🎲 Dice
106
+ dice_faces = ['A', 'B', 'C', 'D', 'E', 'F']
107
+ st.header("🎲 Dice")
108
+ if st.button("Roll Dice"):
109
+ rolled_letter = random.choice(dice_faces)
110
+ st.write(f"Rolled Letter: {rolled_letter}")
111
+
112
+ # Feature 4: πŸ“š Dictionary
113
+ dictionary = ['apple', 'banana', 'cherry', 'date', 'elderberry', 'fig']
114
+ st.header("πŸ“š Dictionary")
115
+ st.write(f"Valid Words: {', '.join(dictionary)}")
116
+
117
+ # Feature 5: πŸ”  Alphabet
118
+ alphabet = list(string.ascii_uppercase)
119
+ st.header("πŸ”  Alphabet")
120
+ st.write(f"Available Letters: {', '.join(alphabet)}")
121
+
122
+ # Feature 6: πŸ”„ Turn
123
+ current_player = "Player 1"
124
+ st.header(f"πŸ”„ Current Turn: {current_player}")
125
+
126
+ # Feature 7: 🧩 Board
127
+ board = [['_' for _ in range(5)] for _ in range(5)]
128
+ st.header("🧩 Board")
129
+ for row in board:
130
+ st.write(' '.join(row))
131
+
132
+ # Feature 8: πŸ” Challenge
133
+ def challenge_word():
134
+ challenged_word = st.text_input("Enter the word to challenge:")
135
+ if challenged_word in dictionary:
136
+ st.write(f"{challenged_word} is a valid word!")
137
+ else:
138
+ st.write(f"{challenged_word} is not a valid word!")
139
+
140
+ st.header("πŸ” Challenge")
141
+ if st.button("Challenge Word"):
142
+ challenge_word()
143
+
144
+ # Feature 9: πŸ’° Score
145
+ player_scores = {"Player 1": 0, "Player 2": 0}
146
+ st.header("πŸ’° Scores")
147
+ for player, score in player_scores.items():
148
+ st.write(f"{player}: {score} points")
149
+
150
+ # Feature 10: ❌ Pass
151
+ def pass_turn():
152
+ global current_player
153
+ if current_player == "Player 1":
154
+ current_player = "Player 2"
155
+ else:
156
+ current_player = "Player 1"
157
+ st.write(f"Turn passed to {current_player}")
158
+
159
+ st.header("❌ Pass")
160
+ if st.button("Pass Turn"):
161
+ pass_turn()
162
+
163
+ # Feature 11: 🎭 Rhyming Words
164
+ rhyming_words = [
165
+ ("cat", "hat"), ("dog", "log"), ("play", "day"), ("night", "light"),
166
+ ("moon", "june"), ("star", "car"), ("sun", "fun"), ("tree", "free"),
167
+ ("sky", "high"), ("rain", "pain"), ("cloud", "proud"), ("wind", "kind"),
168
+ ("bird", "word"), ("flower", "power"), ("grass", "class"), ("leaf", "belief"),
169
+ ("rock", "clock"), ("water", "daughter"), ("fire", "desire"), ("earth", "birth")
170
+ ]
171
+
172
+ st.header("🎭 Top 20 Rhyming Word Pairs")
173
+ for pair in rhyming_words[:20]:
174
+ st.write(f"{pair[0]} - {pair[1]}")