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

Practical Practice

The document outlines a comprehensive list of programming tasks across various topics including basic programming, NumPy and Pandas, OpenCV for image processing, and Matplotlib for data visualization. Each section contains multiple tasks that require the implementation of specific algorithms or functionalities, such as calculating statistical measures, manipulating arrays, performing image operations, and creating visualizations. The tasks are designed to enhance programming skills and familiarity with different libraries and concepts.

Uploaded by

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

Practical Practice

The document outlines a comprehensive list of programming tasks across various topics including basic programming, NumPy and Pandas, OpenCV for image processing, and Matplotlib for data visualization. Each section contains multiple tasks that require the implementation of specific algorithms or functionalities, such as calculating statistical measures, manipulating arrays, performing image operations, and creating visualizations. The tasks are designed to enhance programming skills and familiarity with different libraries and concepts.

Uploaded by

Neha Makhija
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

BASIC PROGRAMS

1. Write the menu driven program to calculate mean ,mode and median for the given data .
[ 3,5,7,9,13,15,18]
2. Write a program to display Fibonacci Series
3. Write a program to calculate the greatest of 4 numbers. Where the numbers are entered by
user
4. Write a program to display the number entered by user is Armstrong or not
5. Write a program to input a string and count the number of vowels and consonants in the
string
6. Write a program to check the string entered by user is in palindrome or not
7. Write a menu-driven program to calculate the sum, average, and product of a list of numbers
entered by the user.
8. Write a program to find the factorial of a number entered by the user.
9. Write a program to calculate the sum of the first N natural numbers where N is provided by
the user.
10. Write a program to display the prime numbers between 1 and 100.
11. Write a program to find the smallest and largest number in a list of numbers entered by the
user.
12. Write a program to calculate the GCD (Greatest Common Divisor) and LCM (Least Common
Multiple) of two numbers entered by the user.
13. Write a program to generate Pascal's Triangle up to the number of rows entered by the user.
14. Write a program to input a string and count the number of words in the string.
15. Write a program to reverse a string entered by the user.
16. Write a program to sort a list of numbers in ascending and descending order.
17. Write a program to calculate the sum of digits of a number entered by the user.
18. Write a program to check whether a number entered by the user is a perfect number or not.
19. Write a program to convert a decimal number entered by the user into binary, octal, and
hexadecimal.
20. Write a program to input two matrices and perform their addition.
21. Write a program to display the multiplication table of a number entered by the user.
22. Write a program to count the frequency of each character in a string entered by the user.
23. Write a program to input two strings and check whether they are anagrams or not.
24. Write a program to check whether a year entered by the user is a leap year or not.
25. Write a program to implement a basic calculator that can add, subtract, multiply, and divide
two numbers entered by the user.
26. Write a program to find the second largest number in a list entered by the user.
27. Write a program to find the square root of a number entered by the user without using the
math library.
28. Write a program to find the sum of all even and odd numbers in a list entered by the user.
29. Write a program to input a sentence and replace all occurrences of a specific word with
another word.
30. Write a program to display the transpose of a matrix entered by the user.
31. Write a program to input a list of numbers and find the difference between the maximum and
minimum numbers.

NumPy and Pandas Program


1. Write a program to compute the sum of the first n prime numbers. The value of n should be
entered by the user.
2. Write a menu-driven program to display the usage of any 4 NumPy mathematical functions
(e.g., sum(), mean(), max(), min()).
3. Write a menu-driven program to display the usage of any 4 NumPy array operations (e.g.,
addition, subtraction, multiplication, division).
4. Write a program to create a NumPy array and find its transpose.
5. Write a program to create a Pandas DataFrame from a dictionary and display its information
using info() and describe().
6. Write a program to create a Pandas Series and find the sum and mean of its elements.
7. Write a program to create a NumPy array of integers and find the sum of all even numbers in
the array.
8. Write a program to create a Pandas DataFrame and sort it based on a specific column.
9. Write a program to create a 3x3 NumPy matrix and calculate its determinant using NumPy.
10. Write a program to load a CSV file into a Pandas DataFrame and display the first 5 rows.
11. Write a program to create a NumPy array and reshape it into a 2D array of size m x n, where m
and n are entered by the user.
12. Write a program to create a Pandas DataFrame and filter rows based on a condition.
13. Write a program to create a NumPy array and calculate the cumulative sum of its elements.
14. Write a program to create a Pandas Series and find the value counts of its unique elements.
15. Write a program to create a Pandas DataFrame and calculate the mean of each column.
16. Write a program to create a NumPy array and perform element-wise multiplication with
another array.
17. Write a program to create a Pandas DataFrame and group data by a specific column, then
calculate the sum for each group.
18. Write a program to create a NumPy array and find its unique elements using np.unique().
19. Write a program to create a Pandas DataFrame and drop a column by its name.
20. Write a program to create a NumPy array and calculate the standard deviation of its elements.
21. Write a program to create a Pandas DataFrame and add a new column based on the values of
existing columns.
22. Write a program to create a NumPy array and flatten it into a 1D array using flatten().
23. Write a program to create a Pandas DataFrame and check for null values in each column.
24. Write a program to create a 2D NumPy array and slice a specific row or column from it.
25. Write a program to create a Pandas DataFrame and save it to a CSV file.

OpenCV (Image Processing)


1. Write a program using OpenCV to:
 Load an image and display it.
 Convert it into grayscale and display the result.
2. Write a program to:
 Load an image using OpenCV.
 Crop a specific part of the image and save it as a new file.
3. Write a program using OpenCV to apply a Gaussian blur to an image and display the result.

4. Write a program using OpenCV to resize an image to half of its original dimensions.

5. Write a program to detect edges in an image using the Canny Edge Detection method in
OpenCV.

6. Write a program to convert a colored image to HSV format using OpenCV.

7. Write a program to load two images using OpenCV and blend them together using a specified
weight ratio.

8. Write a program to draw a rectangle and circle on an image using OpenCV functions.

9. Write a program using OpenCV to add text to an image.

10. Write a program to flip an image vertically and horizontally using OpenCV.
Matplotlib (Data Visualization)
1. Write a program to create a line chart using the data:
X = [1, 2, 3, 4, 5]
Y = [10, 20, 30, 40, 50]
2. Write a program to create a bar chart using Matplotlib for:
Categories = ["A", "B", "C", "D"]
Values = [5, 10, 15, 20]
3. Write a program to plot a pie chart using Matplotlib for the data: [30, 20, 50].

4. Write a program to create a scatter plot using the data:


X = [10, 20, 30, 40, 50]
Y = [1, 4, 9, 16, 25]
5. Write a program to create a histogram using Matplotlib for random data of size 100.

6. Write a program to create a stacked bar chart using Matplotlib for:


Category1 = [5, 10, 15]
Category2 = [3, 6, 9]
7. Write a program to annotate a point on a Matplotlib line chart.

8. Write a program to display multiple plots (line chart and bar chart) on the same figure using
subplots.

9. Write a program to customize the appearance of a Matplotlib plot by adding titles, labels, and
legends.

10. Write a program to create a box plot using Matplotlib for a list of data points. (Dummy data)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy