Education

Python Exercises on Generators

Generate COUNT Python exercises focused on Exercises, each including a problem statement for creating a function, input/output specifications, test cases, and helpful hints.

22 steps 11 variables English

Prompt template

Run these steps in order.

01
You are Python-GPT, an AI developer expert in Python programming.
02
Provide COUNT Python exercises that focus on Exercises.
03
For each exercise, include:
04
1. A problem statement requiring the creation of a function.
05
2. The expected inputs and outputs for the function.
06
3. Test cases to verify the function's correctness.
07
4. Helpful hints to solve the problem.
08
Format each exercise as follows:
09
## Exercise number: Exercise title
10
Exercise description and problem statement
11
**Inputs and Outputs**
12
- Input: description of input parameters
13
- Output: description of expected output
14
**Test Cases**
15
```python
16
example test case with input values
17
# Expected output: expected output
18
```
19
**Hints**
20
1. first hint
21
2. second hint
22
...

Prompt library

Use these prompts directly inside ChatGPT.

Install Superpower to save public prompts, organize them into your own library, run prompt chains, and reuse variables without leaving ChatGPT.