0% found this document useful (0 votes)
7 views4 pages

Cs Record

bhbhbhbh

Uploaded by

taniyasekaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Cs Record

bhbhbhbh

Uploaded by

taniyasekaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

print("generate quotient and remainder from a division")

print("***********************************************")

d1=int(input("enter dividend:"))

d2=int(input("enter divisor"))

d=d1//d2

print("quotient of division=",d)

r=d1%d2

print("remainder of division=",r)

n1 = float(input("Enter the first number: "))

n2 = float(input("Enter the second number: "))

n1 = n1 + n2

n2 = n1 - n2

n1 = n1 - n2

print("After swapping:")

print("First numb

print("calculater:1.add 2.sub 3.mul 4.div")

n1=int(input("enter first number:"))

n2=int(input("enter second number:"))

calc=int(input("enter your choice:"))

if calc==1:

print("sum is:",n1+n2)

elif calc==2:

print("sub is:",n1-n2)

elif calc==3:

print("product is:",n1*n2)

elif calc==4:
print("quotient is:",n1/n2)

else:

print("invalid choice")

print("CHECK IF NUM:\n 1.positive\n 2.negative \n 3.zero")

n=int(input("enter a number:"))

if n>0:

print(n,"is positive")

elif n<0:

print(n,"is negative")

elif n==0:

print(n,"is zero")

print("finding:\n 1.max num \n 2.min num \n 3.mid num")

n1=float(input("enter num1:"))

n2=float(input("enter num2:"))

n3=float(input("enter num3:"))

if n1>n2 and n1>n3:

if n2>n3:

print("max num=",n1)

print("min num=",n3)

print("mid num=",n2)

elif n3>n2:

print("max num=",n1)

print("min num=",n2)
print("mid num=",n3)

elif n2>n1 and n2>n3:

if n1>n3:

print("max num=",n2)

print("min num=",n3)

print("mid num=",n1)

elif n3>n1:

print("max num=",n2)

print("min num=",n1)

print("mid num=",n3)

elif n3>n1 and n3>n2:

if n1>n2:

print("max num=",n3)

print("min num=",n2)

print("mid num=",n1)

elif n2>n1:

print("max num=",n3)

print("min num=",n1)

print("mid num=",n2)

print("AREA CALCULATOR \n 1.circles \n 2.square \n 3.rectangle \n 4.triangle")

op=int(input("enter your option:"))

if op==1:

r=float(input("enter radius:"))

area=3.14*r*r
print("area of circle=",area)

elif op==2:

s=float(input("enter side:"))

area=s*s

print("area of square=",area)

elif op==3:

l=float(input("enter the length="))

b=float(input("enter the breadth="))

area=l*b

print("area of rectangle=",area)

elif op==4:

b=float(input("enter the base="))

h=float(input("enter the height="))

area=1/2*b*h

print("area of triangle=",area)

else:

print("output not found")

You might also like