Python Basics Assignment
Python Basics Assignment
Business Applications
Overview
This assignment is intended for an intern at InjivaCodes Business IT Solutions. It is
designed to build a foundation in Python programming while simultaneously
cultivating a critical, analytical approach to solving practical business problems.
Interns are expected to implement robust and maintainable code along with thoughtful
documentation that explains the reasoning behind each design decision.
Instructions:
Instructions:
Define a list of dictionaries, where each dictionary includes the following keys:
id (integer)
product_name (string)
quantity_sold (integer)
unit_price (float)
Example:
python
sales_data = [
{"id": 1, "product_name": "Laptop", "quantity_sold": 3,
"unit_price": 1200.50},
{"id": 2, "product_name": "Monitor", "quantity_sold": 5,
"unit_price": 300.75},
{"id": 3, "product_name": "Keyboard", "quantity_sold": 10,
"unit_price": 45.99}]
Critical Considerations:
Identify and document the assumptions made about the dataset's structure and
integrity.
Evaluate the current data model and suggest alternative representations that
could be more suitable for scaling business operations.
Instructions:
product_name (string)
stock (integer)
threshold (integer)
Example:
python
inventory = [
{"product_name": "Laptop", "stock": 5, "threshold": 10},
{"product_name": "Monitor", "stock": 15, "threshold": 10},
{"product_name": "Keyboard", "stock": 8, "threshold": 10}]
Using a loop and conditional statements, identify products where the available
stock is below the threshold.
For each product meeting this criterion, display a message in the following
format:
Reflective Inquiry:
Instructions:
Define a list of sales numbers (e.g., [250, 400, 320, 560, 390]).
Reflective Inquiry:
Explain the business relevance of the average and maximum sale values.
Discuss additional metrics (e.g., minimum sale, standard deviation) that might
be beneficial in a comprehensive sales analysis.
Create a CSV file named sales_report.csv with the following headers and
sample data:
date,region,sales_amount
2025-04-20,North,1200.50
2025-04-21,South,950.75
2025-04-22,East,1100.00
Reads the CSV file using Python’s csv module or standard file I/O.
Critical Analysis:
Instructions:
Critical Considerations:
Objective: Integrate the various tasks into a cohesive command-line interface (CLI)
that allows users to select and execute specific business analyses.
Instructions:
Conduct an inventory check and notify when stocks are low (Task 3).
Utilize Python’s input() function to capture user selections and ensure robust
input validation.
Structure your application so that each menu option triggers the corresponding
function or script developed in earlier tasks.
Analytical Inquiry:
Submission Requirements
Code Quality
Documentation
Files to Submit
Evaluation Criteria
Conclusion
This assignment is designed not only to evaluate your Python programming skills but
also to encourage a disciplined, reflective approach to problem-solving within a
business context. By methodically analyzing and refining your code, you will develop
the critical thinking required to address real-world IT challenges effectively.
We anticipate that this exercise will provide valuable insights into both the technical
and strategic aspects of business IT operations, preparing you for a dynamic career at
InjivaCodes Business IT Solutions.