Задача №1:
for i in range(20):
print("Дом")
Задача №2:
s = 0
for i in range(1, 101):
s += i
print(s)
Объяснение:
# -------1-------
[print("Дом") for i in range(20)]
# ---2---------
summ = 0
for i in range(100):
summ += i+1
print(summ)
Задача №1:
for i in range(20):
print("Дом")
Задача №2:
s = 0
for i in range(1, 101):
s += i
print(s)
Объяснение:
# -------1-------
[print("Дом") for i in range(20)]
# ---2---------
summ = 0
for i in range(100):
summ += i+1
print(summ)