0% found this document useful (0 votes)
59 views13 pages

Class 11 Practical File

The document contains 13 programming problems involving basic mathematical operations and conditional logic. The problems include displaying messages, comparing numbers, calculating powers and sums of series, determining if a number is perfect, Armstrong or prime, and finding the greatest common divisor, largest number, and smallest number in a list. For each problem, the code to solve the problem and expected output are listed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views13 pages

Class 11 Practical File

The document contains 13 programming problems involving basic mathematical operations and conditional logic. The problems include displaying messages, comparing numbers, calculating powers and sums of series, determining if a number is perfect, Armstrong or prime, and finding the greatest common divisor, largest number, and smallest number in a list. For each problem, the code to solve the problem and expected output are listed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

PROGRAM 1:

WRITE A PROGRAM TO INPUT WELCOME MESSAGE AND DISPLAY IT

CODE:

OUTPUT:

PROGRAM 2: Input two numbers and display the larger number.

CODE:
OUTPUT:

PROGRAM 3: Input two numbers and display the smallest number.

CODE:

OUTPUT:

PROGRAM 4: Input three numbers and display the largest number.

CODE:
OUTPUT :

PROGRAM 5: Given two integers x and n, compute 𝑥︎ n

CODE:

Python

OUTPUT:
PROGRAM 6: Write a program to input the value of x and n and print the sum of the
following series
1+x+x2+x3+x4+ …………xn

CODE:

OUTPUT:

PROGRAM 7: Determine whether a number is a perfect number or not

CODE:
OUTPUT:

PROGRAM 8: Write a program to find sum of digits in a number

CODE:

OUTPUT:

PROGRAM 9: Determine whether a number is a Armstrong number or not

CODE:

OUTPUT:
PROGRAM 10: Input a number and check if the number is a prime or composite number.

CODE:
OUTPUT:

PROGRAM 11: Compute the greatest common divisor of two integers

CODE:

OUTPUT:
PROGRAM 12: Find the largest number in a list

CODE:

OUTPUT:
PROGRAM 13: Find the Smallest number in a list

CODE:

OUTPUT:

You might also like