-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
34 lines (34 loc) · 890 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from typing import List
# Skeleton code for even_list
def even_list(int_list: List[int]) -> List[int]:
"""
Determines if a number is even and return an even list.
Args:
int_list: A list of integer.
Returns:
A list of even integers.
"""
# TODO: Implement even_list
pass
# Skeleton code for sum_of_squares_of_even
def sum_of_squares_of_even(even_int_list: List[int]) -> int:
"""
Computes the sum of the squares of all even numbers in a lis
Args:
even_int_list: A list of even integers.
Open-Source Software Practice 3
Returns:
The sum of the squares of all even numbers in the list.
"""
# TODO: Implement sum_of_squares_of_even
pass
# Main function
def main():
# Example list
int_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
even_int_list = even_list(int_list)
output = sum_of_squares_of_even(even_int_list)
print(output)
# Boilerplate code
if __name__ == "__main__":
main()