Skip to content

Task 2.3: Samer_ComplexCode.py has a complex algorithmic operation for percentiles #108

Description

@FPSwitch

Here in the Samer_ComplexCode.py, we have a function that is supposed to show the position of a value based on the percentile and data that is given. The issue is that the whole calculation is done on one line without explanation.

This is a problem because this can cause others to not understand which steps are being taken first in this whole operation.

def percentile(pth, total):
    """
    This function returns the position of a value based on the percentile
    and total number of values in the data
    """
    return (pth/100) * total

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