Answers from our videos

Every MindShark video lesson ends on a question. Find yours and tap to see the answer.

  1. Python

    Why is 10 / 2 showing 5.0?

    Now you

    What does ten double-slash four give?

    10 // 4
    Show the answer

    2

    Two slashes divide and drop the remainder: 4 goes into 10 twice, with 2 left over. One slash keeps the decimal, so 10 / 4 is 2.5.

  2. Python

    Why does round(2.5) give 2?

    Now you

    What does round of four point five give?

    round(4.5)
    Show the answer

    4

    When a number sits exactly halfway, Python rounds to the even neighbor. 4 is even, so 4.5 goes down to 4, while 3.5 goes up to 4.

  3. Python

    Why does scores[4] crash?

    Now you

    A list holds ten names. Which position holds the last one?

    names[ ? ]
    Show the answer

    9

    Python counts positions from zero, so ten names sit at positions 0 to 9. Asking for position 10 stops with an IndexError.

  4. SQL

    Why did DELETE empty the whole table?

    Now you

    The ids are unique. With WHERE id = 7, how many rows go?

    DELETE FROM users WHERE id = 7;
    Show the answer

    1 row

    DELETE removes every row the WHERE clause matches. The ids are unique, so only one row has id 7. With no WHERE, every row matches.

A new lesson is added every week. Each button opens a course with the subject filled in. One Deep Dive a day is free. No card.