import random
# from even.py import get_evens
# from odd.py import get_odds
# from mean.py import get_mean
# from max.py import get_max
# from sum.py import get_sum
numbers = [random.randint(1, 100) for i in range(25)]
# even.py
def get_evens():
for num in numbers:
if num % 2 == 0:
print(num, sep=' ')
# odd.py
def get_odds():
if num % 2 != 0:
# mean.py
def get_mean():
print(sum(numbers) / len(numbers))
# max.py
def get_max():
print(max(numbers))
# sum.py
def get_sum():
print(sum(numbers))
def main():
get_evens()
get_odds()
get_mean()
get_max()
get_sum()
main()
Писал с телефона, могут быть ошибки
import random
# from even.py import get_evens
# from odd.py import get_odds
# from mean.py import get_mean
# from max.py import get_max
# from sum.py import get_sum
numbers = [random.randint(1, 100) for i in range(25)]
# even.py
def get_evens():
for num in numbers:
if num % 2 == 0:
print(num, sep=' ')
# odd.py
def get_odds():
for num in numbers:
if num % 2 != 0:
print(num, sep=' ')
# mean.py
def get_mean():
print(sum(numbers) / len(numbers))
# max.py
def get_max():
print(max(numbers))
# sum.py
def get_sum():
print(sum(numbers))
def main():
get_evens()
get_odds()
get_mean()
get_max()
get_sum()
main()
Писал с телефона, могут быть ошибки