Add Chapter 6 python files and fix grammar issues in readme
This commit is contained in:
parent
a84f1223bf
commit
bcb2885eeb
15 changed files with 422 additions and 3 deletions
14
thinkcspy/Chapter-6-Exercises/Python-files/problem13.py
Normal file
14
thinkcspy/Chapter-6-Exercises/Python-files/problem13.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Runestone.Academy thinkcspy course
|
||||
# Chapter 6
|
||||
# Problem 13
|
||||
|
||||
def sumTo(n):
|
||||
# your code here
|
||||
runningTotal = 0
|
||||
|
||||
for counter in range(n):
|
||||
runningTotal = runningTotal + (n+1)/2
|
||||
|
||||
return runningTotal
|
||||
|
||||
print(sumTo(10))
|
||||
Loading…
Reference in a new issue