You are on page 1of 2

# SHARATH CHANDRA 22315A0319

# ASSIGNMENT

num=int(input("ENTER A NUMBER: "))


for i in range (2,num):
if num % i == 0 :
print ("composite")
break

else :
print("prime")

output : ENTER A NUMBER: 54


composite

# SHARATH CHANDRA 22315A0319


# ASSIGNMENT

A= (int(input(" your grade :")))


if 0<=A<36 :
print ("F")
elif 36<=A<45:
print("E")
elif 45<=A<60 :
print ("D")
elif 60<=A <70 :
print("C")
elif 70<=A<90 :
print ("B")
elif 90<=A<100 :
print ("A")

output : your grade :59


D

# SHARATH CHANDRA 22315A0319


# ASSIGNMENT

A=(int(input("solution :")))
if A % 2 ==0 :
print ("It is a even number")
else :
print (" it is an odd number")

output : solution :4565


it is an odd number

# SHARATH CHANDRA 22315A0319


# ASSIGNMENT

A=(int(input("you scored: ")))


if 0<= A<65 :
print("C")
if 65<=A<80 :
print("B")
if 80<=A<=100 :
print ("A")

output : you scored: 100


A

# SHARATH CHANDRA 22315A0319


# ASSIGNMENT

A= int (input(" "))


B= int (input(" "))
C= int (input(" "))
#discrement
d= (B**2)-(4*A*C)
#Solutions
sol1= ((-B+(d**0.5))/(2*A))
sol2= ((-B-(d**0.5))/(2*A))
print("the roots are: ", sol1,sol2)

output :22
66
44
the roots are: -1.0 -2.0

# SHARATH CHANDRA 22315A0319


# ASSIGNMENT

A=[10,35,56,7]
A.sort ()
print(A)
print("largest number is : ",A[3])
print("smallest number is: ",A[0])

output : [7, 10, 35, 56]


largest number is : 56
smallest number is: 7

You might also like