← Back to videos

Mock interview with Alisher for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed interview Level: Strong Junior (backed by solid engineering experience)

The candidate passed confidently: his prior commercial software engineering background showed in calm, mature discussions of programming paradigms, pure functions, the four pillars of OOP, and maintainability, handling curveballs gracefully while stating knowledge boundaries honestly.

Candidate: Alisher
Target role: Junior Python Developer

35 y/o · 7 years of commercial experience as a 1C developer, transitioning to Python after completing Yandex Practicum's Python Developer course

Answers accuracy 14 total
89% score
Theory
6/8 correct · 88%
Live coding
5/6 correct · 92%
Practical task
Partially solved

Analyzing iterative & recursive functions (factorial), function purity, and refactoring

The candidate accurately traced both functions, pinpointed both purity violations in the second function (print I/O and global variable VALUE dependency), clearly explained if __name__ == '__main__' for test imports, and suggested descriptive naming. However, he did not recognize the factorial formula n! or spot the n == 0 base-case bug in the recursive version.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Engineering maturity and architectural literacy (referencing Clean Architecture and real multi-developer maintenance pain points)
  • + Sharp grasp of pure functions, side effects, parameters vs arguments, and if __name__ == '__main__'
  • + Above-Junior conceptual depth across structural, functional, and OOP paradigms and the four OOP pillars
  • + Calm composure under questioning and honest acknowledgment of knowledge boundaries without bluffing

Areas to improve

  • → Refresh foundational developer math concepts (such as recognizing iterative and recursive factorial n! in code)
  • → Review idiomatic lambda use cases as inline callbacks to higher-order functions (sorted, min/max key=, map)
  • → Solidify Python's multiparadigm nature and core constraints of functional programming
  • → Watch base-case edge bugs when reading recursive functions (such as n == 0 returning 0 instead of 1 in factorial)

Questions in this interview

14 / 14
01 ▶ 03:03
What is a paradigm in general, and what is a programming paradigm?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Defined a paradigm as a distinct framework of thought, naming structured, object-oriented, and functional programming as approaches that impose specific architectural constraints on code.

Key takeaway

As Robert C. Martin notes in Clean Architecture, structured programming disciplines direct control transfer, OOP disciplines indirect transfer via polymorphism, and FP disciplines mutable state assignment.

Open moment on YouTube ↗
#01
02 ▶ 07:31
What are the core ideas of structured and functional programming, and can you use them in Python?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Confirmed Python supports all three, describing conditionals/loops in structured programming and passing data through functions in functional/procedural code.

Key takeaway

Python blends structured control flow, rich OOP classes/protocols, and functional tools (first-class callables, closures, generators, itertools, functools).

Open moment on YouTube ↗
#02
03 ▶ 10:06
What is a function in programming, and why use functions instead of duplicating code and using search-and-replace?
Theory Functions, scopes & closures
?
Candidate's answer

Defined a function as a named reusable abstraction hiding implementation details, countering Ctrl+F with real multi-module team scenarios where duplicated API logic leads to missed updates and bugs.

Key takeaway

Encapsulating logic in functions upholds DRY by isolating contract or API changes to a single source of truth.

Open moment on YouTube ↗
#03
04 ▶ 14:08
What are lambda functions in Python and why do they exist alongside regular def functions?
Theory Functions, scopes & closures
?
Candidate's answer

Described lambdas as anonymous inline functions that avoid polluting a module with single-use helper names, though without citing higher-order callbacks (sorted/map/filter) or the single-expression syntax limit.

Key takeaway

Python lambdas are single-expression inline callables ideal as arguments like sorted(users, key=lambda u: u.age); binding a lambda to a name violates PEP 8 (use def instead).

Open moment on YouTube ↗
#04
05 ▶ 19:50
What is a pure function?
Theory Functions, scopes & closures
?
Candidate's answer

Clearly stated both criteria using two-number addition: no hidden external dependencies and no observable side effects outside the function.

Key takeaway

Pure functions are trivial to unit-test, memoize (@functools.lru_cache), and parallelize because outputs depend solely on inputs with zero shared-state mutation.

Open moment on YouTube ↗
#05
06 ▶ 21:20
What do iterative function get_result(n) (multiplying 2..n) and recursive get_result_2(n) compute?
Live coding Algorithms, code reading & engineering practices
?
Candidate's answer

Accurately traced the product of 2..n (computing 6 for n = 3) and the recursive multiplication in get_result_2, but did not recognize mathematical factorial n! or spot the n = 0 bug in get_result_2.

Key takeaway

Multiplying 1..n computes factorial n! (available in stdlib as math.factorial); since 0! == 1, returning n when n == 0 is a classic base-case bug that zeroes out any product.

Open moment on YouTube ↗
#06
07 ▶ 25:30
What is recursion, why is it used (e.g., in binary search), and which paradigm favors it?
Live coding Algorithms, code reading & engineering practices
?
Candidate's answer

Explained self-invocation on shrinking subproblems via binary search halving a sorted list, noted any recursion can be rewritten as a loop, and linked recursion to functional programming.

Key takeaway

CPython intentionally omits tail-call optimization and caps call depth around sys.getrecursionlimit() (~1000), making iterative loops safer for large inputs.

Open moment on YouTube ↗
#07
08 ▶ 29:15
Which of the two functions (get_result vs get_result_2) is pure, which is impure, and why?
Live coding Functions, scopes & closures
?
Candidate's answer

Correctly identified get_result as pure and caught both purity violations in get_result_2: terminal I/O via print() and reliance on module-global variable VALUE.

Key takeaway

Reading module-level globals introduces hidden coupling and breaks referential transparency if that global changes or is absent elsewhere.

Open moment on YouTube ↗
#08
09 ▶ 33:19
What is the purpose of if __name__ == '__main__': in a Python module?
Live coding Modules, packages, imports & stdlib
?
Candidate's answer

Explained that the guard runs entry-point code only when the file is executed directly as a script, preventing side-effect execution when imported by other modules or unit tests.

Key takeaway

Python sets __name__ to '__main__' for the top-level entry script, whereas importing the file sets __name__ to the module's import path.

Open moment on YouTube ↗
#09
10 ▶ 36:00
What would you refactor in this snippet during code review to improve readability?
Live coding Algorithms, code reading & engineering practices
?
Candidate's answer

Proposed replacing vague identifiers (get_result, n, VALUE) with intention-revealing names and using an early-return guard clause to flatten conditional nesting.

Key takeaway

Handling edge cases via early-return guard clauses at the top of a function keeps the main happy path flat and readable.

Open moment on YouTube ↗
#10
11 ▶ 41:07
What is the difference between a function parameter and a function argument?
Live coding Functions, scopes & closures
?
Candidate's answer

Cleanly distinguished the two: a parameter is the variable declared in the function signature, whereas an argument is the actual value passed at the call site.

Key takeaway

Parameters are formal names in def func(param):, while arguments are the concrete expressions supplied at call time func(arg).

Open moment on YouTube ↗
#11
12 ▶ 42:22
What is a linter and what kinds of issues does it catch?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Listed static code checks: syntax and indentation issues, formatting violations, missing/unused imports, undefined names, and type mismatches.

Key takeaway

Modern Python projects combine linters/formatters (Ruff, Flake8, Black) with static type checkers (mypy, pyright) in pre-commit and CI.

Open moment on YouTube ↗
#12
13 ▶ 44:44
Does merely wrapping code in classes mean you're writing OOP, and what are the four pillars of OOP?
Theory OOP, classes & dunder methods
?
Candidate's answer

Argued that classes alone (e.g., bag-of-functions classes) aren't true OOP, naming and explaining all four pillars: abstraction (protocols/ABCs), encapsulation, inheritance, and polymorphism.

Key takeaway

Grouping static procedures inside a class is still procedural code; genuine OOP centers on encapsulating state invariants and polymorphic behavior.

Open moment on YouTube ↗
#13
14 ▶ 52:09
Is Python strictly an object-oriented language or a multiparadigm language?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Initially answered 'object-oriented', then acknowledged the contradiction with supporting structured and functional code and agreed Python is multiparadigm.

Key takeaway

Python is explicitly multiparadigm: built on an all-objects data model while natively supporting procedural, OOP, and functional programming.

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

Alisher shows confident knowledge of Python basics, calmly and carefully answers my questions without getting confused even in difficult situations.

I prepared a new code fragment that he wasn't familiar with beforehand. We never quite figured out what this code was supposed to do. However, despite this, Alisher confidently works with it, demonstrating good understanding of program structure and logic.

A special feature of this video — not just an emphasis on fundamental knowledge, but also a conversation about programming paradigms. This is something you usually don't expect from beginners, but Alisher's level of preparation allowed us to raise the bar and dive into more complex topics.

Of course, I managed to find moments where confidence wavered a bit — and this is an important part of any interview.

If you're preparing for interviews, interested in how a strong junior thinks, or just want to level up your skills — this video will definitely be useful.

Want to try yourself in this format? Write in the comments and apply!

🔥 Support Alisher with a like and subscribe if you want more such interviews!

Timestamps:

00:00 Introduction
00:24 A few words about the interviewer and candidate
03:00 Theoretical questions
21:16 Working with code
42:20 Continuation of theoretical questions
53:35 Feedback exchange

On this channel I conduct mock interviews for the role of Python developer for anyone interested. This is a great opportunity to prepare for a real interview, improve your skills, get useful tips and honest feedback. I do all of this absolutely for free. However, maintaining quality requires significant time and resources. If you like my content and want to support the channel, I'll be grateful for any financial support.

https://www.tbank.ru/cf/4PYyn4udS41

#MockInterview #Interview #Python #Backend #Programming