Aayush Tiwari2
Aayush Tiwari2
Tiwari
Class -- XIth – C
To – Gurmeet sir
(C.S)
Q1 write a program take principal ,rate and time as input and show the
simple interest (SI=(P*R*T)/100)
P= int(input(“enter principal”))
R=int(input(“enter rate”))
T=Int(input(“enter time”))
SI=(P*R*T)/100
Print(SI)
OUTPUT
Enter principal56
Enter rate
Enter time90
011235813......
a=0
b=1
print(a,b,end="")
c=a+b
print(send ="")
a=b
output
b=c
print("commission is 1000")
print("commission is 500")
print("commission is 2000")
else:
print("invalid")
--output--
commission is 1000
print("passed")
else:
print("Failed")
Output
passed
a=int(input("enter number"))
print("divisible")
else:
print("not divisible")
Output
enter number67
divisible
if marks>40:
print("pass")
else:
print("fail")
--output--
enter marks50
pass
if age>=18:
else:
--output--
sunday
n=int(input("enter no of items"))
a=0
b=1
print(a,b,end=" ")
for i in range(1,n-1):
c=a+b
print(c,end=" ")
a=b
b=c
--output--
i=1
while i<=10:
print(i)
i=i+1
--output--
10
Q11 write a program to take income as input and calculate the 40% tax.
show the tax and income after
tax .
income=int(input("enter income"))
tax=income*40/100
real=income-tax
enter income57
Q12 write a program take principal ,rate and time as input and show the
simple interest
(SI=(P*R*T)/100)
P=int(input("enter principal"))
R=int(input("enter rate"))
T=int(input("enter time"))
SI=(P*R*T)/100
print(SI)
OUTPUT
enter principal56
enter rate78
enter time90
3931.2
print("1st is greater")
print("2nd is greater")
print("3rd no is greater")
enter 1st no 5
enter 2st no 4
enter 3st no 3
1st is greater
Sunday
n=int(input("enter no of items"))
a=0
b=1
print(a,b,end=" ")
for i in range(1,n-1):
c=a+b
print(c,end=" ")
a=b
b=c
--output—
Q15 write a program to take income as input and calculate the 40% tax.
show the tax and income after tax .
income=int(input("enter income"))
tax=income*40/100
real=income-tax
enter income57
Q16 write a program take principal ,rate and time as input and show the
simple interest (SI=(P*R*T)/100)
P=int(input("enter principal"))
R=int(input("enter rate"))
T=int(input("enter time"))
SI=(P*R*T)/100
print(SI)
OUTPUT
enter principal56
enter rate78
enter time90
3931.2
Q17 write aprogram to take salary as input and calculate the followings:
HRA:20%OF SALARY
DA:10%OF SALARY
Gross Salary:Salary+DA+HRA
output
s=int(input("enter salary"))
HRA=salary*20/100
DA=salary*10/100
GS=salary+DA+HRA
Tax=GS*20/100
NS=GS-Tax
print(HRA)
print(DA)
print(GS)
print(Tax)
print(NS)
if a==1:
print("monday")
elf a==2:
print("tuesday")
elif a==3:
print("wednesday")
elif a==4:
print("thursday")
elif a==5:
print("friday")
elif a==6:
print("saturday")
elif a==7:
print("Sunday")
output
Saturday
n=int(input("enter number"))
m=n
rev=0
while n>0:
b=n%10
rev=rev*10+b
n=n//10
output
enter number76
reverse number is 6
reverse number is 67
Q 20 write a program to print fibonacci series upto n terms
011235813……
A=0
B=1
Print(a,b,end=””)
C=a+b
Print(send =””)
A=b
Output
B=C
0 11