EdBoy2202 commited on
Commit
6bf249e
·
verified ·
1 Parent(s): b5da343

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -3
app.py CHANGED
@@ -162,9 +162,45 @@ if topic:
162
  prompt = f"""
163
  Generate a multiple-choice quiz on the topic of "{topic}".
164
  The quiz should have 5 questions.
165
- For each question, provide four plausible options labeled A, B, C, and D.
166
- Clearly indicate the correct answer for each question at the end in a separate section called "Answer Key".
167
- Format the quiz clearly for easy reading.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  """
169
  response = model.generate_content(prompt)
170
  quiz_content = response.text
 
162
  prompt = f"""
163
  Generate a multiple-choice quiz on the topic of "{topic}".
164
  The quiz should have 5 questions.
165
+
166
+ **Formatting Instructions:**
167
+
168
+ 1. **Question Numbering:** Start each question with a number followed by a period (e.g., "1.").
169
+ 2. **Question Text:** Immediately after the question number, write the question text.
170
+ 3. **Options:**
171
+ * List four options for each question, labeled A, B, C, and D.
172
+ * Use the format: "A) Option text", "B) Option text", etc. (letter followed by a parenthesis, then a space, then the option text).
173
+ * Place each option on a new line directly below the question.
174
+ 4. **Answer Key:**
175
+ * After all questions, create a separate section titled "**Answer Key:**".
176
+ * In the Answer Key, list the correct answer for each question in the format: "1. Correct option letter", "2. Correct option letter", etc. (question number, period, space, correct option letter - A, B, C, or D).
177
+
178
+ **Example of Desired Format:**
179
+
180
+ **Quiz Title (Optional, but good to have)**
181
+
182
+ 1. Question 1 text?
183
+ A) Option A
184
+ B) Option B
185
+ C) Option C
186
+ D) Option D
187
+
188
+ 2. Question 2 text?
189
+ A) Option A
190
+ B) Option B
191
+ C) Option C
192
+ D) Option D
193
+
194
+ ... (and so on for 5 questions) ...
195
+
196
+ **Answer Key:**
197
+ 1. C
198
+ 2. A
199
+ 3. B
200
+ 4. D
201
+ 5. A
202
+
203
+ Please generate the quiz in this exact format.
204
  """
205
  response = model.generate_content(prompt)
206
  quiz_content = response.text