"""WAP using loop calculate the first n number"""
n = int(input("Enter the value of n: "))
avg = 0.0
s = 0
for i in range(1,n+1):
s=s+i
avg=s/i
print(f"The sum of first {n} natural no(s): {s}")
print(f"The avg of first {n} natural no(s): {avg}")
To embed this project on your website, copy the following code and paste it into your website's HTML: