How can i write a simple addition of values based on some rules/condition given which is boolean in python [closed]

  python

enter image description here

The image attached is the requirement where i have to keep the condition or rules in a separate python file and have to access them in my main.py for doing the operation.

Can someone help me in creating a function separately for these condition in a python file and accessing those in main.py for performing the addition.

Source: Python Questions

LEAVE A COMMENT