What you'll build
An AI will happily explain any function — and now and then it is slightly wrong, or invents one that does not exist. Learn the habit that keeps you safe: ask, then run it yourself to check.
Requirements
The must-do parts. If any are missing, we'll ask you to take another pass.
- Pick one function you are curious about —
random.randintis a good start. Ask an AI to explain it: what it does, what goes in the brackets, and what comes out. Use the starter prompt. - Take the example the AI gives you and run it in Colab — actually run it, do not just read it.
- Say clearly whether the AI was right, or where it was off (wrong argument order, a typo, or a function that does not really exist). One or two sentences is enough.
- Then do the same loop once more — ask, run, check — for a function you have NOT used before, from any library.
- Deliberately ask the AI about a function that does not exist (make one up, like
random.luckynumber). See what it claims, then check in Colab and write down what happened. This is how you learn to catch a confident-but-wrong answer.
Examples
What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.
# The AI said: random.randint(1, 6) gives a whole number from 1 to 6,
# both ends included.
import random
print(random.randint(1, 6)) # -> 4
print(random.randint(1, 6)) # -> 1
# Ran it ten times: never saw 0 or 7. The AI was right.Where to start
Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.
Paste this into any AI assistant. Swap in any function you want to check.
I'm a beginner in Python. Explain the function random.randint:
- what does it do, in one plain sentence?
- what goes inside the brackets, and in what order?
- give me one example I can paste into Colab and run.
Then tell me one common mistake people make with it.How we'll grade it
Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.
| Check | What we look for | Pt |
|---|---|---|
| Asked a focused question | The prompt names one specific function and asks what goes in and what comes out. | 1 |
| Ran the example | The AI's example was actually run in Colab, and the output is shown. | 1 |
| Checked the answer | You state plainly whether the AI was right — and if not, what was off. | 1 |
| Did it twice | The same ask-then-verify loop was repeated for a second, unfamiliar function. | 1 |