Skip to content

Commit

Permalink
Create harmonic_progression.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirali0029 authored Oct 5, 2020
1 parent 07a802d commit 3933156
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def HP(a,d,n):
curr_term=a
for i in range(1,n+1):
temp=a+(i-1)*d
print(1/temp)


a = 2
d = 1
n = 5

HP(a, d, n)

0 comments on commit 3933156

Please sign in to comment.