Thanks to visit codestin.com
Credit goes to github.com

Skip to content

using max() on a dictionary is confusing #5

@Crush-Steelpunch

Description

@Crush-Steelpunch

Python dictionary exercises Lesson8-j and Lesson8-k

Max function to get the key with the highest value

The wording is unclear and the dictionary values unhelpfully mix strings and integers. Students may expect ans_1 = max(dict) to return "son's height" as it has the highest value however it returns "son's weight" as it contains the letter closest to "z"

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