33 lessons
Python · Module 1Module material

Getting Started interview questions

25 questions interviewers ask on this module’s topics, from first principles to the follow-ups. Each comes with a model answer.

Python and notebooks

  1. Is Python compiled or interpreted?●
  2. What is the difference between Python 2 and Python 3 that you are most likely to notice?●
  3. What is the difference between a statement and an expression?●
  4. In a Jupyter notebook, why can a cell that worked earlier fail after a restart, and what do you do about it?●●

Variables and types

  1. Is Python statically or dynamically typed? Is it strongly or weakly typed?●
  2. What actually happens in x = 5?●●
  3. What is the difference between is and ==?●●
  4. Are integers mutable? What does x += 1 do to the object?●●
  5. How do you swap two variables in Python?●
  6. What is None, and how do you check for it?●
  7. Can you name a variable list? Should you?●●
  8. What are type annotations, and does Python enforce them?●●

Conversion and truthiness

  1. What does input() return?●
  2. Which values are falsy in Python?●●
  3. What is the difference between int(2.9) and round(2.9)?●●
  4. Why is "10" > "9" False?●●

Operators

  1. What is the difference between / and //?●
  2. What is -7 // 2, and -7 % 2? Why?●●
  3. What do 2 ** 3 ** 2 and -2 ** 2 evaluate to?●●
  4. Why is 0.1 + 0.2 == 0.3 False, and how should you compare floats?●●
  5. What do and and or return?●●
  6. What is True + True?●●

Formatting

  1. What does print return? What do its sep and end arguments do?●
  2. How do you print a number with two decimal places and a thousands separator?●
  3. What does f"{x=}" do?●●

Directory listings

  • SchoolWhool on Siteefy