#################################################
# collab2.py
#
# Your name:
# Your andrew id:
# Collaborator andrew ids:
#################################################

import cs112_m20_day2_linter
import math

#################################################
# Helper functions
#################################################

def almostEqual(d1, d2, epsilon=10**-7):
    return (abs(d2 - d1) < epsilon)

import decimal
def roundHalfUp(d):
    # Round to nearest with ties going away from zero.
    rounding = decimal.ROUND_HALF_UP
    # See other rounding options here:
    # https://docs.python.org/3/library/decimal.html#rounding-modes
    return int(decimal.Decimal(d).to_integral_value(rounding=rounding))

#################################################
# Functions for you to write
#################################################

def carrylessAdd(x, y):
    return 42

#################################################
# Test Functions
################################################

def testCarrylessAdd():
    print('Testing carrylessAdd()... ', end='')
    assert(carrylessAdd(0, 0) == 0)
    assert(carrylessAdd(4, 5) == 9)
    assert(carrylessAdd(23, 57) == 70)
    assert(carrylessAdd(785, 376) == 51)
    assert(carrylessAdd(102, 108) == 200)
    assert(carrylessAdd(865, 23) == 888)
    print('Passed!')

#################################################
# Main
################################################

def testAll():
    testCarrylessAdd()

def main():
    cs112_m20_day2_linter.lint()
    testAll()

if __name__ == '__main__':
    main()
