Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Solution Review: Highs and Lows

Sumit Rawal answered on May 18, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Exercise: Highs and Lows

  • Solution Review: Highs and Lows

    0

    def count_low_high(num_list):

    if (len(num_list)==0):

    return None

    high_list = list(filter(lambda n: n > 50 or n % 3 == 0, num_list))

    low_list = list(filter(lambda n: n <= 50 and not n % 3 == 0, num_list))

    return [len(low_list), len(high_list)]

    num_list = [20, 9, 51, 81, 50, 42, 77]

    print(count_low_high(num_list)) 

    Popularity 1/10 Helpfulness 1/10 Language python
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 18 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.