Quick actions

cmd+k|ctrl+k

Navigation

Languages

Example_for_loop

Snippet info

Language

Python

Visibility

public

Author

ws-tam

Created

2024-11-01T03:40:03.567304Z

Updated

2024-11-01T03:40:03.567304Z

def sum_greater_than(numbers, n):
    list = [2,5,8,9,10,12,34,9,4,55]
    sum = 0
    for val in list:
        if val > n:
            sum = sum + val
    return sum
print(sum_greater_than(list, 10))
INFO