File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tracks/python/exercises/grains Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def square(number):
1818 """ Return the number of grains on a given square number.
1919
2020 :param number: int - square number on which we want to calculate the amount of grains.
21- :return: int - amount of grains present on the give square number(number).
21+ :return: int - the amount of grains present on the given square number(number).
2222 """
2323 if number < 1 or number > 64 :
2424 raise ValueError (" square must be between 1 and 64" )
@@ -38,7 +38,7 @@ def total():
3838### ` square(number) `
3939
4040As we did ` 2**(number - 1) ` on block one there will be only 1 grain, 2 to the power of 0 equals 1.
41- On block 2 there will 2 and on block 3 there will be 4 which is equal to 2 to the power of 1, and 2 to the power of 2, respectively.
41+ On block 2 there will be 2 and on block 3 there will be 4 which is equal to 2 to the power of 1, and 2 to the power of 2, respectively.
4242Hence generalized, ** 2 to the power of (number-1)** .
4343
4444### ` total() `
You can’t perform that action at this time.
0 commit comments