ChamplainTechJournals/python-csi160/week03/Week-3Practice-Problems/part3.py
2025-04-19 23:42:08 -04:00

7 lines
170 B
Python

# Read an integer:
number = int(input('Enter a 3 digit number: '))
# Print the sum of the digits:
a = ((number // 100) + (number % 100 // 10) + (number % 10))
print(a)