Exp 2
Exp 2
OUTPUT
for i in range(n):
a= int(input("Enter Number"))
lst.append(a)
sum+=a
print(f"\nAvg {sum/n}")
for i in range(n):
square.append((lst[i])*lst[i])
OUTPUT
3. Write a program to display the following patterns using nested
loops.
a =int(input("Enter"))
for i in range(1,a+1):
for j in range(i):
print(i,end=' ')
print()
OUTPUT
a = int(input("Enter"))
OUTPUT
a = int(input("Enter"))
OUTPUT
4. Write a program to print the sum of the following series
a.
OUTPUT
b.