Python Programming
Python Programming
Prajjwal Bhatt
Class 11th CBSE
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:
CODE:
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:
CODE:
OUTPUT:
OUTPUT:
CODE:
OUTPUT:
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: