Ask for explanations, not just answers
Compare two requests:
- "Write a program that finds the largest number in a list."
- "I wrote this loop to find the largest number, but it returns 0 for negative numbers. Explain why, and give me a hint instead of the full fix."
The second request keeps you doing the work. You learn why largest = 0 fails for a list such as [-4, -2, -9], and you will remember it next time.
Writing good prompts
- Give context: the language, what the program should do, and what you have tried.
- Paste the exact error and the relevant code, not a description of it.
- Say your level: "I am a beginner, explain without classes" gets a more useful answer.
- Ask for one step at a time when you are building something new.
Always check the answer
AI assistants can be confidently wrong. They may invent functions that do not exist or miss edge cases. Before you trust code from an assistant:
- Read it and make sure you can explain every line.
- Run it, with normal input and with edge cases such as an empty list.
- Check unfamiliar functions in official documentation, such as MDN for the web or docs.python.org for Python.
Unays Code helps with this: it runs automatic checks and tests on generated code and shows the documentation it used, but you are still the one who decides whether the code is right.
Honest schoolwork
Follow your teacher's rules about AI. A good default: use AI to understand and to get feedback, but write graded work yourself, and say when and how you used an assistant. If you cannot explain your own submission, you have not learned it yet.
Keep personal information out
Never paste passwords, API keys, or other people's personal information into an AI chat. Unays explains how it handles requests in its Privacy Policy.
Try it yourself
Write a short program on your own in Unays Code, then ask Unays AI to review it and suggest one improvement, with an explanation. Apply the change yourself and test it.
This tutorial was written with AI assistance and reviewed by Unays. The runnable code examples were tested before publishing. Spotted a mistake? Tell us at [email protected].