1.
a = int(input("Введите число a (>= 5): "))
summ = 0
for i in range(5, a+1):
summ += 1/(i-1)
print(round(summ, 3))
2.
counter = 0
for i in range(1000, 10000):
if i%10 == i//10%10:
counter += 1
print(counter)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
1.
a = int(input("Введите число a (>= 5): "))
summ = 0
for i in range(5, a+1):
summ += 1/(i-1)
print(round(summ, 3))
2.
counter = 0
for i in range(1000, 10000):
if i%10 == i//10%10:
counter += 1
print(counter)