0% found this document useful (0 votes)
14 views

Computer Science Assignment: - Tanishq Bhargava Class Xi-B, Roll No 30

This document contains Tanishq Bhargava's computer science assignment responses. It includes a Python program to find the largest of three input numbers and determine if a 3-digit number is an Armstrong number. The largest number program uses conditional statements to compare the three inputs and print the largest. The Armstrong number program takes a 3-digit input, sums the cubes of each digit, and checks if it equals the original number.

Uploaded by

tanishq
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)
14 views

Computer Science Assignment: - Tanishq Bhargava Class Xi-B, Roll No 30

This document contains Tanishq Bhargava's computer science assignment responses. It includes a Python program to find the largest of three input numbers and determine if a 3-digit number is an Armstrong number. The largest number program uses conditional statements to compare the three inputs and print the largest. The Armstrong number program takes a 3-digit input, sums the cubes of each digit, and checks if it equals the original number.

Uploaded by

tanishq
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/ 3

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”))

You might also like