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

Python Program Class 11 Practicle

Uploaded by

prajjwalbhatt074
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Python Program Class 11 Practicle

Uploaded by

prajjwalbhatt074
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PYTHON PROGRAMMING

1. Input a welcome message and display it.


CODE:

OUTPUT:

2. Input three numbers and display the largest and smallest number.
CODE:
OUTPUT:

3. Generate the following pattern using nested loop.

OUTPUT:
CODE:

4. Generate the following pattern using nested loop.

OUTPUT

CODE:
5. Determine whether a number is a perfect number, an Armstrong
number or a palindrome.

CODE:
OUTPUT:
6. Input a number and check if the number is a prime or composite
number.
CODE:

OUTPUT:
7. Display the terms of a Fibonacci series.

CODE:

OUTPUT:
8. Compute the greatest common divisor and least common multiple
of two integers.

CODE:

OUTPUT:

9. Count and display the number of vowels, consonants, uppercase,


lowercase characters in string.

CODE:
OUTPUT:

10. Input a string and determine whether it is a palindrome or


not; convert the case of characters in a string.
CODE:

OUTPUT:

11. Find the largest/smallest number in a list/tuple.

CODE:
OUTPUT:

12. Input a list of numbers and swap elements at the even


location with the elements at the odd location.

CODE:

OUTPUT:
13. Input a list/tuple of elements, search for a given element in
the list/tuple.

CODE:

OUTPUT:

14. Input a list of numbers and find the smallest and largest
numbers from the list.
CODE:

OUTPUT:

15. Create a dictionary with the roll number, name and marks of
n students in a class and display the names of students who
have marks above 75.

CODE:
OUTPUT:

You might also like