COMPUTER SCIENCE ASSIGNMENT
-TANISHQ BHARGAVA
CLASS XI-B , ROLL NO 30
Q1) FIND THE LARGEST AND SMALLEST NUMBER IN A LIST
ANS)-- #python program to find the largest number among three input
numbers
A=int(input(“enter 1st no: “))
B=int(input(enter 2nd no: “))
C=int(input(enter 3rd no: “))
if(A>B):
if(A>C):
print(A, “is the largest no”)
else:
print(C, “Is the largest no”)
else:
if(B>C):
print(B, “is the largest no”)
else:
print(C,”is the largest no”)
OUTPUT::
Q2) TO ACCEPT WHETHER THE GIVEN NUMBER IS AN ARMSTRONG OR NOT
ANS):: num=int(input(“Enter 3 digit no”))