Ответ:
1 задача:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = []
for i in a:
if i%2 != 0:
b.append(i)
print(b)
2 задача:
numbers = [386, 462, 47, 418, 907, 344, 236, 375,
823, 566, 597, 978, 328, 615, 953, 345, 399, 162,
758, 219, 918, 237, 412, 566, 826, 248, 866, 950,
626, 949, 687, 217]
for i in numbers:
if i == 237:
break
if i%2 == 0:
отметь лучшим пж
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
1 задача:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = []
for i in a:
if i%2 != 0:
b.append(i)
print(b)
2 задача:
numbers = [386, 462, 47, 418, 907, 344, 236, 375,
823, 566, 597, 978, 328, 615, 953, 345, 399, 162,
758, 219, 918, 237, 412, 566, 826, 248, 866, 950,
626, 949, 687, 217]
b = []
for i in numbers:
if i == 237:
break
if i%2 == 0:
b.append(i)
print(b)
отметь лучшим пж