Skip to content

Fetching the median value for the list of items which has even length #3

@pavanio

Description

@pavanio

I think the formula for fetching the median for even length is wrong.

fileName: coding projects/stats.py in median() line no 107

Current Code:

return ordered[middle]

Correct Code:

return (ordered[middle] + ordered[middle-1])/2

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