python_math_stat/practica/stepik/sketches/sketches.py

48 lines
1010 B
Python
Raw Normal View History

2023-10-04 16:07:27 +03:00
# 1 fail
# i = 0
# while i < 5:
# print('*')
# if i % 2 == 0:
# print('**')
# if i > 2:
# print('***')
# i = i + 1
# 2 fail
# for num in range (a, b+1):
# print (num,end="\t")
# for num_2 in range (c, d+1):
# # # print (num_1)
# # m= int(num_1) * c
# # # print (m)
# # n= int(num_1) * d
# # # print (n)
# # if m == n:
# # print (str(num_1),str(m), sep ='\t')
# # else:
# print(num * num_2, end="\t")
# print()
# 3 fail
# a=1
# b=2
# c=3
# d=4
# for i in range(a, b + 1):
# print(i, end="\t")
# for n in range(c, d + 1):
# print(i * n, end="\t")
# print()
2023-10-04 17:12:15 +03:00
2023-10-05 14:19:18 +03:00
initial_list = input().split()
sum_list = []
left_index = -1
right_index = -len(initial_list) + 1
middle_index = 0
while middle_index < len(initial_list):
sum_list.append(initial_list[left_index] + initial_list[right_index])
left_index += 1
right_index += 1
middle_index += 1
print(sum_list)