0% found this document useful (0 votes)
3 views1 page

Python Programming Assignment 5

This document outlines Assignment 5 for a Python programming course, with a submission deadline of 28/04/2026. It includes 12 tasks that cover various programming concepts such as loops, conditionals, file handling, data structures, and data visualization using libraries like Pandas and Matplotlib. The tasks require students to implement programs for calculations, pattern printing, data analysis, and graphical representation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Programming Assignment 5

This document outlines Assignment 5 for a Python programming course, with a submission deadline of 28/04/2026. It includes 12 tasks that cover various programming concepts such as loops, conditionals, file handling, data structures, and data visualization using libraries like Pandas and Matplotlib. The tasks require students to implement programs for calculations, pattern printing, data analysis, and graphical representation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Programming

Assignment 5

Note: 1) The submission date for this assignment is 28/04/2026.


2) This assignment is to be written on A4 sheets only.

1) Write a Python program that takes two integers, start and end, as input and prints the sum
of all even numbers and the sum of all odd numbers within that inclusive range.

2) Write a program to take a year as input and check whether the given year is a leap year or
not.

3) Write a program that opens a text file and counts the total number of characters, words and
sentences present in it. Print the result.

4) Write a program to print the Fibonacci series up to n terms, where n is provided by the
user as input.

5) Write a program to convert temperature from Celsius to Fahrenheit.

6) Write a program to check whether a given string is palindrome or not.

7) Write a program to print below pattern:


A
AB
ABC
ABCD

8) Write a program to print below pattern:


​ 5
44
333
2222
11111

9) Write a program to remove duplicate elements from a list and display the unique list.

10) Write a program to create a 1D array and 2D array.

11) Write a Python program using Pandas to:


●​ Create a DataFrame with student details (Name, Marks, Grade)
●​ Display:
○​ Students who scored above 75
○​ The average marks
○​ Add a new column Status where:
■​ "Pass" if marks ≥ 40
■​ "Fail" otherwise

12) Write a Python program using Matplotlib to:


●​ Take a list of 5 students and their marks
●​ Plot:
○​ A bar graph showing marks
○​ A line graph for the same data
○​ Add labels, title, and legend

You might also like