Skip to content

make the sum function work with strings #1

@acesmeci

Description

@acesmeci

Relevant code in src/utils.py:

def sum(a: int, b: int) -> int:
    '''
    This function returns the sum of two numbers

    Args:
    a: float the first number
    b: float the second number

    Returns:
    float the sum of a and b
    '''
    return a + b

Expected behavior: Be able to sum numbers with strings
Actual behavior: TypeError cannot sum str

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions