Академический Документы
Профессиональный Документы
Культура Документы
prograMMes
INPUT(PROGRAME
a=10
b=20
c=a+b
OUTPUT
INPUT
volume=4/3*3.14*radius**3
OUTPUT
INPUT
value=num1**num2
S=U*T+1/2*A*T**2
OUTPUT
INPUT
volume=3.14*radius**2*height
OUTPUT
INPUT
if a%2==0:
OUTPUT
number is divisible by 2
INPUT
if a%2==0:
OUTPUT
INPUT
if sales>=3000:
amount=sales-sales*0.18
elif sales>=2000:
amount=sales-sales*0.10
else:
amount=sales-sales*0.05
OUTPUT
INPUT
Computer science
prograMMes
#write a menu programe
print("MENU")
print("1.Area of a Circle")
print("2.Area of a Square")
print("3.Area of a Rectangle")
if choice==1:
area=3.14*radius**2
if choice==2:
area=side**2
if choice==3:
area=length*breadth
OUTPUT
MENU
1.Area of a Circle
Computer science
prograMMes
2.Area of a Square
3.Area of a Rectangle
INPUT
OUTPUT
INPUT
for a in range(1,11):
OUTPUT
INPUT
for a in range(1,6):
OUTPUT
INPUT
#wap to find the squares of first 10 natural numbers using while loop
a=0
while(a<=9):
a=a+1
Computer science
prograMMes
print("the squares are :",a*a)
OUTPUT
INPUT
#write a programme to find the cubes of first 10 natural numbers
a=0
while(a<=9):
a=a+1
OUTPUT
INPUT
fact=1
for a in range(1,6):
fact=fact*a
OUTPUT
INPUT
fact=1
Computer science
prograMMes
for a in range(1,10):
fact=fact*a
OUTPUT
INPUT
sum=0
for a in range(1,11):
sum=sum+a
OUTPUT