Skip to content

Commit 3307e20

Browse files
committed
meaningfull variable names
1 parent d13c9a0 commit 3307e20

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Series/Geometric.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Geometric.py
2-
""" Geometric takes the first number a_1, the q and the number of elements Num, and returns a list containing "Num" numbers in the Geometric series.
3-
Pre-Conditions - a_1 should be an Number.
4-
- q should be an Number.
2+
""" Geometric takes the first number firstElem, the ratio and the number of elements Num, and returns a list containing "Num" numbers in the Geometric series.
3+
Pre-Conditions - firstElem should be an Number.
4+
- ratio should be an Number.
55
- Num should be an integer >=1.
66
7-
Geometric(a_1=7,q = 9,Num = 5) --> Standard function call
7+
Geometric(firstElem=7,ratio = 9,Num = 5) --> Standard function call
88
9-
Output --> Num numbers are returned in series starting from a_1 with geometric value q
9+
Output --> Num numbers are returned in series starting from firstElem with geometric value ratio
1010
1111
Example:
1212
@@ -15,8 +15,8 @@
1515
"""
1616

1717

18-
def Geometric(a_1, q, Num):
19-
return [a_1 * (q ** i) for i in range(Num)]
18+
def Geometric(firstElem, ratio, Num):
19+
return [firstElem * (ratio ** i) for i in range(Num)]
2020

2121

2222
if __name__ == '__main__':

0 commit comments

Comments
 (0)