Ответ:
inputNumber = input('Введите число: ')
numbers = []
i = 0
while i < len(inputNumber):
number = inputNumber[i]
if not number.isnumeric():
continue
numbers.append(int(number))
i += 1
n = 0
m = 1
for number in numbers:
n += number
m *= number
print(n, m, sep='\n')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
inputNumber = input('Введите число: ')
numbers = []
i = 0
while i < len(inputNumber):
number = inputNumber[i]
if not number.isnumeric():
continue
numbers.append(int(number))
i += 1
n = 0
m = 1
for number in numbers:
n += number
m *= number
print(n, m, sep='\n')