migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
7
python-csi160/week03/Week-3Practice-Problems/part3.py
Normal file
7
python-csi160/week03/Week-3Practice-Problems/part3.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
# 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)
|
Loading…
Add table
Add a link
Reference in a new issue