Write a loop that calculates the total of the following series of numbers:
#Initialized the variable
totalNum = 0
#Calculate the total of the
#series of numbers:
#1/30+2/29+3/28+...+30/1
for i in range(1, 31):
totalNum += i / (31 - i)
print("The total is:", totalNum)
Executed Output:
The total is: 93.84460105853213