Ответ:
a = [1, 5, 3, 9, 4, 2, -3, -1, 45]
r = ""
for x in a:
w = 2 * x + 6
if w > 0:
if r == "":
r = f"{w}"
else:
r = f"{r}, {w}"
print(r)
спасибо!
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
a = [1, 5, 3, 9, 4, 2, -3, -1, 45]
r = ""
for x in a:
w = 2 * x + 6
if w > 0:
if r == "":
r = f"{w}"
else:
r = f"{r}, {w}"
print(r)
спасибо!