промежутое

This commit is contained in:
2025-12-05 11:48:13 +05:00
parent 30647281a5
commit dcb80ef973
48 changed files with 1190 additions and 0 deletions

16
programm1/data_types3.py Normal file
View File

@@ -0,0 +1,16 @@
temp = input().strip()
def main(score: str):
if not score:
raise ValueError("Пустой ввод")
if not score.isdigit():
raise ValueError("Введены не цифры")
total: int = 0
for x in score:
total += int(x)
print(f"сумма цифр = {total}")
try:
main(temp)
except ValueError as e:
print(f"Ошибка: {e}")