Class 11_CS_Practicals_Python Programming-1
Class 11_CS_Practicals_Python Programming-1
1|Page
20 Input a list/tuple of elements, search for a 22/11/2024
given element in the list/tuple.
21 Write a program to create a dictionary with 3/01/2025
the roll number, name and marks of n
students in a class and display the names of
students who have marks above 75.
2|Page
Practical No-1
Source Code
Output
3|Page
Practical No-2
Source Code
Output
4|Page
Practical No-3
# Write a program to check whether year is a Leap year or not.
Source Code
Output
5|Page
Practical No-4
Source Code
6|Page
Output
7|Page
Practical No-5
Source Code
Output
8|Page
Practical No-6
Source Code
Output
9|Page
Practical No-7
Source Code
Output
10 | P a g e
Practical No-8
if num == sum:
print(num,"is an Armstrong number")
else:
print(num,"is not an Armstrong number")
Output
11 | P a g e
Practical No-9
Source Code
if rev == oN:
print("The number is a palindrome")
else:
print("The number is not a palindrome")
Output
12 | P a g e
Practical No-10
Source Code
Output
13 | P a g e
Practical No-11
Source Code
Output
14 | P a g e
Practical No-12
Output
15 | P a g e
Practical No-13
while True:
if((greater % x == 0) and (greater % y == 0)):
lcm = greater
break
greater += 1
Output
16 | P a g e
Practical No-14
Source Code
Output
17 | P a g e
Practical No-15
Source Code
Output
18 | P a g e
Practical No-16
Source Code
for i in str:
if i.islower():
count_lower+=1
if i.isupper():
count_upper+=1
if i in 'aeiouAEIOU':
count_vowel+=1
else:
count_cons+=1
print("Total count of vowels : ",count_vowel)
print("Total count of consonants : ",count_cons)
print("Total count of uppercase characters : ",count_upper)
print("Total count of lowercase characters : ",count_lower)
Output
19 | P a g e
Practical No-17
Source Code
Output
20 | P a g e
Practical No-18
Source Code
lst = []
num = int(input('How many numbers: '))
for i in range(num):
num = int(input('Enter number : '))
lst.append(num)
print("Maximum element in the list is :", max(lst), "\nMinimum element in the list is
:", min(lst))
Output
21 | P a g e
Practical No-19
Source Code
Output
22 | P a g e
Practical No-20
Source Code
Output
23 | P a g e
Practical No-21
Source Code
print(result)
Output
24 | P a g e