Loading interview...
Portfolio Profit Calculator
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
- Seniority
- staff
Interview Prompt
Our portfolio analytics dashboard needs a P&L calculator. Given a list of stock purchases (each with date and share count) and a dictionary of daily prices, compute the total profit or loss by comparing total cost of all purchases against the value of all shares at the most recent price.
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