Hackbright Code Challenges

Max Number: Solution

Max Number: Solution

Problem

Max Number

Whiteboard

Easier

Concepts

Math, Loops, Conditionals

Download

max-num-solution.zip


def max_num(num_list):
    """Returns largest integer from given list"""

    # START SOLUTION

    max_int = num_list[0]
    for num in num_list:
        if num > max_int:
            max_int = num

    return max_int