Overview

Project details

Simple Python project to build and learn how to use EpicLaunchX


Tracks: Python

140

number of points you will earn

2

launches to complete the project

4

tasks to complete the project

This project is part of the following tracks:

Learning outcomes

  • Get adapted to the EpicLaunchX learning style. - Understand the flow actions at EpicLaunchX. - Explore PR and code best practices, and earn your first points. - Learn more about GitHub and master the conventional commit style. - Use Makefile extensively, explore code formatting, linting style, etc.

Project Launches & Tasks

launch_1

  • task_1 (25 points)
    • Create domain/models.py file for domain modeling.

    • Create an Operands class with first_operand and second_operand class fields.

    • Both fields must be int type.

    • Do not forget to implement unit tests for Operands class, use pytest for tests

  • task_2 (30 points)
    • Create function called operands_factory with first_operand and second_operand arguments.

    • Function must be located in domain/models.py.

    • Both arguments must be int type.

    • Factory should return the Operands class object.

    • Factory return type must be Operands as well.

    • Do not forget to implement unit tests for operands_factory function, use pytest for tests

launch_2

  • task_3 (35 points)
    • Create service/calculator.py where you need to put your service logic.

    • Create class Calculator with add(), subtract(), multiply(), and divide() methods.

    • Don't use use @staticmethod or @classmethod, just pure class methods.

    • All class methods must return int type.

    • Each function will accept a single argument called operands of type Operands.

    • For eg, add functionality is operands.first_operand + operands.second_operand.

    • Do not forget to implement unit tests for each method, use pytest for tests

  • task_4 (50 points)
    • To finalize the project, we need an entry point.

    • Create entrypoints/cli/main.py file

    • Implement main() function to get input values for first_operand, second_operand and action from user

    • Please remember that getting input and calculations must happen inside the main() function. This is an all-in-one function.

    • Use these values to construct the functionality of the main function. For example, if Inputs were 45, 35, add, the User wants to sum 45 and 35.

    • Call the respective service Calculator method for each action.

    Do not forget to implement integration tests for each action for the main function, use pytest for tests

Log in to launch project