0% found this document useful (0 votes)
2 views2 pages

Practical Components of Ipcc Python Programming

The document outlines a series of practical programming tasks in Python, including basic arithmetic operations, Fibonacci sequence generation, statistical calculations, text file analysis, and data management. It covers various concepts such as lists, functions, classes, and file handling, providing specific instructions for each task. The tasks aim to enhance programming skills by applying Python to real-world scenarios like data analysis and student grade tracking.

Uploaded by

allurju4
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Practical Components of Ipcc Python Programming

The document outlines a series of practical programming tasks in Python, including basic arithmetic operations, Fibonacci sequence generation, statistical calculations, text file analysis, and data management. It covers various concepts such as lists, functions, classes, and file handling, providing specific instructions for each task. The tasks aim to enhance programming skills by applying Python to real-world scenarios like data analysis and student grade tracking.

Uploaded by

allurju4
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PYTHON PROGRAMMING

PRACTICAL COMPONENTS OF IPCC

1. a. Develop a python program to read 2 numbers from the keyboard and perform the basic arithmetic
operations based on the choice. (1-Add, 2-Subtract, 3-Multiply, 4-Divide).

b. Develop a program to read the name and year of birth of a person. Display whether the person is a
senior citizen or not.

2. a. Develop a program to generate Fibonacci sequence of length (N). Read N from the console.

b. Write a python program to create a list and perform the following operations
• Inserting an element
• Removing an element
• Appending an element
• Displaying the length of the list
• Popping an element
• Clearing the list

3. a. Read N numbers from the console and create a list. Develop a program to print mean, variance and
standard deviation with suitable messages.

b. Read a multi-digit number (as chars) from the console. Develop a program to print the frequency of
each digit with a suitable message.

4. Develop a program to print 10 most frequently appearing words in a text file. [Hint: Use a dictionary
with distinct words and their frequency of occurrences. Sort the dictionary in the reverse order of
frequency and display the dictionary slice of the first 10 items.

5. Develop a program to read 6 subject marks from the keyboard for a student. Generate a report that
displays the marks from the highest to the lowest score attained by the student. [Read the marks into a
1-Dimesional array and sort using the Bubble Sort technique].

6. Develop a program to sort the contents of a text file and write the sorted contents into a separate text
file. [Hint: Use string methods strip(), len(), list methods sort(), append(), and file methods open(),
readlines(), and write()].

7. Develop a function named DivExp which takes TWO parameters a, b, and returns a value c (c=a/b).
Write a suitable assertion for a>0 in the function DivExp and raise an exception for when b=0.
Develop a suitable program that reads two console values and calls the function DivExp.

8. Define a function that takes TWO objects representing complex numbers and returns a new complex
number with the sum of two complex numbers. Define a suitable class ‘Complex’ to represent the
complex number. Develop a program to read N (N >=2) complex numbers and to compute the
addition of N complex numbers.

9. Text Analysis Tool: Build a tool that analyses a paragraph: frequency of each word, longest word,
number of sentences, etc.

10. Develop Data Summary Generator: Read a CSV file (like COVID data or weather stats), convert to
dictionary form, and allow the user to run summary queries: max, min, average by column.

11. Develop Student Grade Tracker: Accept multiple students’ names and marks. Store them in a list of
tuples or dictionaries. Display summary reports (average, topper, etc.).

12. Develop a program to display contents of a folder recursively (Directory) having sub-folders and files
(name and type).

You might also like