The Op Dispatcher
An easy Python mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L4
Interview Prompt
Records in a pipeline's transform step carry a `value` that is either a number or text. Given the `records` and an operation name (`double`, `square`, `abs`, `upper` or `lower`), return each record with a new `result` field holding the transformed value.
Summary
Name the operation, apply it everywhere.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your Python against test cases
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision