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

Practical List

Uploaded by

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

Practical List

Uploaded by

Krish Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1 Input a welcome message and display it.

2 Find the Largest and smallest numbers in a list.


3 Input three numbers and display the largest / smallest
number.
4 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
➢ 1-x+x2-x3+x4-…xn
𝑥2 𝑥3 𝑥4 𝑥𝑛
➢ 𝑥+ − + −⋯
2 3 4 𝑛

𝑥2 𝑥3 𝑥4 𝑥𝑛
➢𝑥+ − + −⋯
2! 3! 4! 𝑛!

5 Determine whether a number is a perfect number, an


Armstrong number or a palindrome.
6 Count and display the number of vowels, consonants,
uppercase, lowercase
characters in string
7 Input a number and check if the number is a prime or
composite number
8 Print prime numbers in given range.
9 Find whether a string is a palindrome or not.
10 Given two integers x and n, compute xn.
11 Compute the GCD and HCF of two numbers
12 Test if a number is equal to the sum of the cubes of its
digits. Find the smallest and largest such numbers.
13 Swap two number using third variable and without using
third variable.
14 Bubble Sort
15 Linear Search
16 Insertion Sort
17 Fibonacci series upto n numbers.
18 Accept a decimal number and print its binary.
19 Check input for number or alphabet, if it is alphabet
check for vowel or consonant.
20 Factorial Of a number.
21 Count number of words in a line.
22 Find the third largest number in a list
23 Read string and then print string that capitalize every
other letter in string/ convert the case of characters in
a string
24 Read a line and count how many times substring appears.
25 Read a string and display longest substring.
26 Remove vowels from string.
27 Read a line and count how many time “to” appear in line.
28 Add 5 in odd values of a list and add 10 in even values
of list.
29 Display unique and duplicate items of given list.
30 Exchange first half elements of list with second half
elements of list.
31 Display strings starting with “A” in list.
32 Shift negative number to left and positive number to
right of list.
33 Find the largest/smallest number in a list/tuple
elements at the odd location.
34 Input a list of numbers and swap elements at the even
location with the elements at the odd location.
35 Input a list/tuple of elements, search for a given
element in the list/tuple.
36 Input a list of numbers and test if a number is equal to
the sum of the cubes of
its digits. Find the smallest and largest such number
from the given list of
numbers.
37 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.
38 Create a dictionary, to input name of 5 employees and
their salary details like basic, house rental allowance.
Calculate total salary and display.
39 Create a dictionary ,to input n names and phone numbers
to store it in a dictionary and print the phone number of
a particular name.
40 Write a Python program to input n classes and names of
their class teachers to store it in a dictionary and
display the same. Also accept a particular class from
user and display the name of the class teacher of that
class.
41 Write a Python program to store student names and their
percentage in a dictionary ,delete a particular student
name from the dictionary .Also display dictionary after
deletion.

You might also like