Answer:
numeratorValue = 1
denominatorValue = 30
count = 0
while numeratorValue <= 30:
difference = numeratorValue / denominatorValue
count += difference
numeratorValue += 1
denominatorValue -= 1
print(count)
Step-by-step explanation:
- Initialize the required variables and run a while loop until the numeratorValue is less than 30.
- Inside the while loop, calculate the difference by dividing the numeratorValue by denominatorValue .
- Add the value of difference variable to the count.
- Increment both the numeratorValue and denominatorValue .
- Lastly display the value of count.