Professional Documents
Culture Documents
LAB ACTIVITY – 1
TOPIC: CONDITIONAL AND LOOPING CONSTRUCTS
SUBJECT: COMPUTERS CLASS: 11
1. Write a menu based program to print the following patterns, by accepting number of
lines:
e. f.
3. WAP to print the Fibonacci series till n terms (Accept n from user).
n=int(input("enter the number of terms: "))
f=0
print(f)
s=1
print(s)
for i in range(2,n):
nxt=f+s
print (nxt)
f=s
s=nxt
4. WAP to find the sum of the following series(accept values of x and n from user)
1 - x/1! + x2/2! - ……….xn/n!
x = int(input("Enter the value of x: "))
n=int(input("Enter the value of n : "))
sum = 0
m=1
if input is 1
and the rows is 7
if input is 2
and the rows is 26