Short animated videos that explain the hardest moments in programming. Each video covers exactly one idea: the code runs line by line while memory, the call stack, and the console change right in front of you. Covering JavaScript, Python, and PHP.
No matching videos — try a different search or language.
56 exercises
Programming practice
Solve a short task in the editor, check the requirements, then open the step-by-step explanation. The checker does not execute code; it looks for key parts of your solution.
✦JS#01
Functions and return
Write total(price, quantity) to return an order total. Four items at 7.5 each should produce 30.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
The function receives two arguments. It multiplies them and uses return to pass the result back to its caller. Return the number itself; printing it with console.log is a different operation.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
Set score to 72. Print Passed when it is at least 60; otherwise print Try again.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
The condition evaluates to true or false, so only one branch runs. “At least 60” means >= 60; using > 60 would incorrectly reject a score of exactly 60.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
Write total(price, quantity) to return an order total. Four items at 7.5 each should produce 30.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
The parameters receive values when the function is called. return passes a value back to the caller, which can store or print it. Calling the function does not print by itself.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
Set score to 72. Print Passed when it is at least 60; otherwise print Try again.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
Python uses a colon after the condition and indentation for the branch body. >= includes the boundary value 60. Use consistent indentation, commonly four spaces per level.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
Use a loop to add the numbers 1 through 5. Store the sum in total and print it.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
range(1, 6) includes 1 but excludes 6, so the loop runs five times. Initialize the accumulator before the loop, then add each value. Using range(1, 5) would omit 5.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
total = 0
for number in range(1, 6):
total += number
print(total)
✦PY#18
Lists: filtering and transforming
Select values above 10 from prices, multiply each by 1.1, and store them in updated.
🔒 This exercise unlocks after free sign-up, along with all course exercises and lessons.
Write total(float $price, int $quantity): float to return the order total. Four items at 7.5 each cost 30.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
Parameter types document the expected inputs; : float declares the result type. return ends the function and passes a value to its caller. Returning a value is easier to test and reuse than printing inside the function.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.
<?php
declare(strict_types=1);
function total(float $price, int $quantity): float
{
return $price * $quantity;
}
echo total(7.5, 4);
✦PHP#31
An if / else check
Set $score = 72. Print Passed when the score is at least 60; otherwise print Try again.
Structure check: code is not run in the browser.
Step-by-step explanation and sample solution
>= includes the boundary value. Braces delimit each branch, while indentation makes the structure easier to read. This example uses echo; in an HTML response, escape untrusted input before output.
Hint: Implement the smallest step first, then check boundaries and call the function with an example.