TalentJR apps
A function is a named block of code you can use again and again. It takes inputs called parameters — in function tip(bill), bill is a parameter — and gives a value back with return. To work out what a line like show(fee(2) + fee(10)) shows, run the function once for each call, write down what each call returns, and then finish the line. Functions keep app code short and tidy.
✓ You passed this lesson’s test.
Write once, use often — “put values in, get a result back with return”
Use it for: Prices, scores, greetings and any sum your app does many times.
Check: Two 10-year-olds would pay 40 + 40 = 80 ✓
▶ Watch it animated✓ Written and checked by the TalentJR team · Updated 13 Oct 2026 · How we make our lessons
Work it out in your head or on paper, then tap your answer — or type it and press Check. Stuck? Press “Show me how”.
Right: 0 · Tried: 0
20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.
🏅 Sign in with Google to earn the 🧰 Function Builder badge when you pass — and a certificate when you finish all 8 lessons of Part 3 · Logic and Building. You can still take the test without signing in.
Why does it work? When should you use it? Ask in English, मराठी or हिंदी.
Sign in with Google to ask Free — 20 questions a day.
Prefer a real teacher? TalentJR teachers take live online classes anywhere in India. Tell us what you need and our team will call you with timings and fees.