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

CS PRACTICAL FILE (AutoRecovered)

The document outlines a series of programming tasks that involve string manipulation, list operations, tuple handling, and dictionary creation in Python. Each task includes a brief description of the problem to solve, followed by a placeholder for the code and output. The tasks range from counting occurrences of substrings to calculating grades based on student marks.

Uploaded by

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

CS PRACTICAL FILE (AutoRecovered)

The document outlines a series of programming tasks that involve string manipulation, list operations, tuple handling, and dictionary creation in Python. Each task includes a brief description of the problem to solve, followed by a placeholder for the code and output. The tasks range from counting occurrences of substrings to calculating grades based on student marks.

Uploaded by

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

Program that reads a line and a substring.

It should then display the number of


occurrences of the given substring in the line.
CODE :

OUTPUT :
Write a program that reads a string and then prints a string that capitalizes every other
letter in the string.
CODE :

OUTPUT :
Write a program that reads a string and checks whether it is a palindrome string or not
without using string slice.
CODE :

OUTPUT :
Write a program to find the minimum element from a list of element along with its index
in the list.
CODE :

OUTPUT :
Write a program to calculate the mean of a given list of numbers.
CODE :

OUTPUT :
Write a program to search for an element in a given list of numbers.
CODE :

OUTPUT :
Write a program to count the frequency of a given element in a list of numbers.
CODE :

OUTPUT :
Write a program to find the second largest element in a given list of numbers.
CODE :

OUTPUT :
Write a Python program which takes an input as tuple T and returns the second largest
element in the tuple.
CODE :

OUTPUT :
Write a program to check if there are multiple maximum element in a tuple or not
CODE :

OUTPUT :
A tuple stores marks of a student in 5 subject. Write a program to calculate the grade of
the student as per the following.
CODE :

OUTPUT :
Write a program to input names of n students and store them in a tuple. Also, input a
name from the user and find if this student is present in the tuple or not.
CODE :

OUTPUT :
Write a program to create a dictionary M which stores the marks of the students of class
with roll numbers as the keys and marks as the values. Get the number of students as
input.
CODE :

OUTPUT :
Write a program to add new students' roll numbers and marks in the dictionary M created
with roll numbers as the keys and marks as the values.
CODE:

OUTPUT :
Write a program to create a dictionary containing names of competition winner students
as keys and number of their wins as values.
CODE :

OUTPUT :

You might also like