LectureMoment
← LectureMoment

warm-up · Basics

Python Programming — Warm-up

8 practice questions on warm-up. Every question is written from a specific moment in a real lecture, and after you answer it links to that exact timestamp so you can check it yourself.

What this pack asks

The free questions in this pack. Answer choices and explanations appear as you play.

  • What's actually wrong with writing "if len(my_list) > 0:" in Python?

    Answer this one →
  • Why do experienced Python devs refuse to use time.time() to measure how long a piece of code takes?

    Answer this one →
  • A Python function has an empty list as a default argument and appends to it. What's in the list on the second call?

    Answer this one →
  • Your code wraps everything in Python's catch-all "except:". The user hits Ctrl+C to quit. What happens?

    Answer this one →
  • People say Python isn't compiled. So what are those .pyc files that appear next to your .py files?

    Answer this one →
  • A namedtuple called Point genuinely is a kind of tuple — yet type(p) == tuple comes out False. Why?

    Answer this one →
  • In Python 3, checking whether a number is inside range(0, 1000000000000) returns instantly. Why?

    Answer this one →
  • In Python 3 you grab d.keys() from a dictionary, then delete one key from d. What does your keys object show now?

    Answer this one →

Written from lectures by mCoding. Not affiliated with or endorsed by any university, channel, creator or certification program.