test1
This commit is contained in:
12
operators_7.py
Normal file
12
operators_7.py
Normal file
@@ -0,0 +1,12 @@
|
||||
total_sum = 0
|
||||
count = 0
|
||||
|
||||
num = int(input("Введите число (0 для завершения): "))
|
||||
|
||||
while num != 0:
|
||||
total_sum += num
|
||||
count += 1
|
||||
num = int(input("Введите число (0 для завершения): "))
|
||||
|
||||
print(f"Сумма: {total_sum}")
|
||||
print(f"Количество: {count}")
|
||||
Reference in New Issue
Block a user