Given op = 'add', x = 10, y = 4, use a dict that maps 'add', 'sub', 'mul', 'div' to lambdas
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
Interview Prompt
Given op = 'add', x = 10, y = 4, use a dict that maps 'add', 'sub', 'mul', 'div' to lambdas. Look up op and call it with x, y. Print the result.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision