Log inBook a Demo
Assessment
Intermediate

Back-End Engineer (Python): fix the store revenue calculator

Time available:45 minutes
|
Available in
+8
ByAnthropos
This simulation was archived and cannot be started
1
The challenge

A Python script used by a major retail chain is producing inaccurate revenue calculations.

2
The issue

The script has operator precedence errors, missing null checks, and improper date comparisons, risking financial losses and compliance issues.

★
Your goal

Your goal is to debug the script, ensuring accurate calculations and adherence to coding standards.

Your Role

Mid-level Software Engineer@ Vertex Innovations

You are a Software Engineer at Vertex Innovations, a leader in tech solutions for financial reporting and analytics.

Other participants

Alex MercerSenior Developer
Samantha CarterEngineering Manager

Context

Vertex Innovations is a leading tech company known for delivering high-quality software solutions in financial reporting and real-time analytics. They specialize in custom software for industries like retail and healthcare, ensuring quality through rigorous testing and adherence to coding standards. Recent projects include a comprehensive financial reporting system for a major retail chain and a real-time analytics platform for a healthcare provider. The company emphasizes professional development, offering regular training and workshops to foster continuous improvement and innovation.

In this simulation, you will review and fix a Python script used by a major retail chain to calculate store revenues. The script has several issues, such as operator precedence errors, missing null checks, and improper date comparisons. These errors can lead to inaccurate financial reports, causing financial losses, compliance issues, and damage to the customer's reputation. Your task is to collaborate with Alex, a senior developer, to identify and correct these issues, ensuring the script meets the required standards for accurate financial reporting.

You will assume the role of Jordan Lee, a mid-level Software Engineer at Vertex Innovations. Your primary task is to review and fix a Python script for calculating store revenues. You will collaborate with Alex Mercer, a senior developer, to ensure the script meets the required standards. The interactions involve discussing identified issues, proposing solutions, and implementing necessary changes. Core decision points include prioritizing which issues to address first, deciding on the best solutions for each problem, and determining how to implement these solutions effectively. You must balance your insights with Alex's guidance to ensure the script adheres to coding standards and best practices.

  • Identify and correct the operator precedence error in the discount calculation.
  • Implement null checks before accessing dictionary values.
  • Use datetime objects for proper date comparisons.
  • Collaborate with Alex Mercer to discuss and implement solutions.
  • Ensure the script adheres to coding standards and best practices.

Evaluated Skills

PythonSoftware Development Fundamentals

Helpful for

Mid-level Software EngineerJunior DeveloperQuality Assurance Engineer