← Back to videos

Mock interview with Fyodor for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Beginner (pre-Junior)

The candidate did not pass yet, though he showed promising analytical potential just six months into learning: he handled algorithmic complexity (Big O for time and space, best vs worst case) and class vs instance attributes well. Key areas to improve are overcoming hesitant phrasing, structuring core OOP concepts (especially encapsulation), and avoiding unverified buzzwords that trigger deeper follow-ups.

Candidate: Fyodor
Target role: Junior Python Developer

Chemistry graduate · 6 months exploring programming, 2 months into a Python developer course, no commercial engineering experience

Answers accuracy 13 total
81% score
Theory
8/13 correct · 81%
Live coding
0/0 correct · 0%
Practical task
No live coding
Topics covered Click a topic to filter questions

Candidate strengths

  • + Solid grasp of algorithms, Big O time and space complexity, and best-case vs worst-case execution
  • + Clear real-world analogy distinguishing shared class attributes from per-object instance attributes
  • + Accurate mental model of variable references vs objects in memory and operator polymorphism (+ on int vs str)
  • + Noticeably stronger composure and clearer reasoning in the second half of the interview

Areas to improve

  • → Review OOP pillars — especially encapsulation (bundling state with methods and hiding internals) vs inheritance
  • → Study Python's LEGB variable-lookup rules and how range sequences differ from one-shot iterators/generators
  • → Communicate more decisively by separating confident facts, explicit 'I don't know', and labeled hypotheses
  • → Avoid dropping unfamiliar terms in answers unless prepared to explain them under immediate follow-up

Questions in this interview

13 / 13
01 ▶ 04:15
What are loops in programming, and how do 'for' and 'while' differ in Python?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Explained that loops automate repeated execution: for traverses a known sequence of items/steps, while while repeats until a stopping condition becomes false.

Key takeaway

Python's for loop iterates directly over any iterable's elements, whereas while re-evaluates a truthy condition before each iteration.

Open moment on YouTube ↗
#01
02 ▶ 05:20
What is iteration, and which built-in Python objects are iterable versus non-iterable?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Defined iteration both as one loop pass and element traversal, recalled the __iter__ dunder method, listed list, str, tuple, and dict keys as iterables, and excluded int and float.

Key takeaway

An object is iterable if it implements __iter__() (or 0-based __getitem__); iterating directly over a dict yields its keys.

Open moment on YouTube ↗
#02
03 ▶ 09:47
What does range() return in a for-loop, and what is the Pythonic way to iterate over a collection?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Correctly noted that range lazily yields integers across start/stop/step without allocating a full list, but misclassified range as an iterator/generator and missed direct element iteration as the Pythonic idiom.

Key takeaway

range is a reusable immutable sequence (not an iterator), and idiomatic Python iterates directly over elements (or via enumerate) rather than range(len(seq)).

Open moment on YouTube ↗
#03
04 ▶ 13:20
What is an object in Python, what is the object in 'a = 3', and how does a method differ from a function?
Theory OOP, classes & dunder methods
?
Candidate's answer

Accurately stated that everything in Python is an object (an instance of a class): in a = 3, 'a' is a variable reference while 3 is an int instance, and a method is a function defined on a class.

Key takeaway

In Python's data model, primitives, functions, modules, and classes themselves are first-class objects possessing an identity (id), type, and value.

Open moment on YouTube ↗
#04
05 ▶ 18:25
What is a class, and how do class attributes differ from instance attributes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Defined a class as a blueprint for instances and used a table analogy to contrast class attributes shared across all instances with per-instance attributes like wood vs metal material.

Key takeaway

Class attributes live on the class __dict__ and are shared across all instances (a classic gotcha with mutable defaults), whereas instance attributes live on each object's own __dict__.

Open moment on YouTube ↗
#05
06 ▶ 22:00
Why do we need classes if plain functions can also be grouped into a module and reused anywhere?
Theory OOP, classes & dunder methods
?
Candidate's answer

Explained code reuse and specialization via subclassing (Phone -> MobilePhone), but when challenged with a module of functions, fell back on avoiding name collisions rather than state encapsulation.

Key takeaway

A module is a single namespace, whereas a class lets you instantiate many independent objects, each maintaining its own encapsulated state behind a shared interface.

Open moment on YouTube ↗
#06
07 ▶ 25:30
What is a naming collision during imports and what bugs can it cause?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Explained that wildcard imports or duplicate definitions overwrite an existing binding in the namespace, silently routing calls to the wrong function.

Key takeaway

Wildcard imports pollute the module namespace and can silently shadow built-ins or earlier imports; prefer explicit imports or module-qualified access.

Open moment on YouTube ↗
#07
08 ▶ 27:19
Can outer code or an enclosing function read a nested function's local variable, and why does visibility work in only one direction?
Theory Functions, scopes & closures
?
Candidate's answer

Correctly stated that outer code cannot access inner local bindings while nested functions can read outer ones, motivating it via avoiding side effects, though he forgot the formal scope terminology.

Key takeaway

Python resolves names strictly outward via the LEGB rule (Local -> Enclosing -> Global -> Built-in); inner local frames do not exist outside their active call.

Open moment on YouTube ↗
#08
09 ▶ 32:02
What are the core pillars of OOP: what do polymorphism, abstraction, and encapsulation mean?
Theory OOP, classes & dunder methods
?
Candidate's answer

Named all four pillars, illustrated polymorphism with '+' on ints vs strings, and explained abstraction well, but confused encapsulation with inheriting parent methods invisibly.

Key takeaway

Encapsulation bundles state with behavior inside a class and restricts direct external tampering with internal representation (via _protected, __mangled, and @property in Python).

Open moment on YouTube ↗
#09
10 ▶ 38:51
What is a data structure (using stacks and arrays as examples), and how does it differ from a data type?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Explained LIFO stacks (pancake/book stack vs numbered shelf) and homogeneous arrays vs Python lists clearly, before getting tangled trying to formalize data type vs data structure.

Key takeaway

A data structure defines memory organization and operation complexities (LIFO stack, array), while a language data type (such as Python's list) exposes a concrete implementation.

Open moment on YouTube ↗
#10
11 ▶ 48:01
What is an algorithm, how does it differ from a program, and how do you choose the best algorithm among alternatives?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Defined an algorithm as a finite sequence of steps producing a target result, a program as its code implementation, and noted that choosing between algorithms balances time vs memory constraints.

Key takeaway

Engineering algorithm choices revolve around time-space trade-offs — e.g., trading O(n) extra memory in a hash set or cache to cut lookup time from O(n) to O(1).

Open moment on YouTube ↗
#11
12 ▶ 53:40
How does Big O notation work, and does it apply to memory usage as well as execution time?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Accurately explained that Big O captures asymptotic growth as input size N scales up, applying equally to time complexity and auxiliary space complexity (alongside little-o and Omega).

Key takeaway

Big O drops constants and lower-order terms to express an asymptotic upper bound on either step count (time complexity) or auxiliary memory growth (space complexity).

Open moment on YouTube ↗
#12
13 ▶ 57:03
What do best-case and worst-case execution mean in algorithm analysis?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Used sequential guessing from 1 to 100 to illustrate best-case execution (finding the target on the very first check, O(1)) versus worst-case execution (checking all 100 numbers, O(n)).

Key takeaway

Production engineering focuses primarily on worst-case and average-case complexity to guarantee predictable latency even on adversarial inputs.

Open moment on YouTube ↗
#13
Original video description & timecodes

Fyodor originally dealt with chemistry, but at some point became interested in programming. Now he's only at the beginning of the journey, but is already trying his hand at a mock interview. Fyodor's story, tricky questions, and feedback to the candidate are all in this episode.