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

Python Programs: Basics to Visualization

Uploaded by

aryanayush2810
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)
4 views2 pages

Python Programs: Basics to Visualization

Uploaded by

aryanayush2810
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

FINAL LIST OF PYTHON PROGRAMS

A. Basic Python Programs

1. Write a program to take a number from the user and check whether it is a prime number or not.

2. Write a program to input two numbers and find their HCF and LCM.

3. Write a program to print the sum of the first 10 natural numbers.

4. Create a list of all the students in your class and sort them in alphabetical order.

5. Write a program to find numbers that are divisible by 7 and multiples of 5 between 1200 and 2200.

6. Write a program to add the elements of two lists.

7. Write a Python program to display all the elements of the ordered list: [3, 6, 9, 10, 11, 14, 15, 22, 25]

8. Write a program to input the name, age, and basic salary of an employee, and calculate the total
salary by adding 10% DA and 10% HRA to the basic salary.

9. Write a program to determine whether a year is a leap year or not (a year is a leap year if it is
divisible by 4).

10. Write a program to display “Valid Voter” if the age of the person is greater than or equal to 18.

Python Lab Programs

1. Write a program to calculate the surface area and volume of a cuboid.

2. Write a program to check whether the number input by the user is an Armstrong number or not.

3. Write a program to take the temperatures of all 7 days of the week and display the average
temperature.

4. Write a Python program to check whether the number input from the user is a palindrome or not.

5. Write a program to print the pattern:

**

***

Programs on Statistics & Matplotlib


1. Write a program to find the mean, mode, median, standard deviation, and variance of the dataset: [4,
8, 6, 5, 3, 2, 8, 9, 2, 5, 4, 4, 9, 23, 6]

2. Write a program to plot a histogram using: pop_age=[21, 34, 56, 78, 32, 19, 77] and bins=[0, 10, 20,
30, 40, 50, 60, 70]

3. Write a program to create a bar chart using: players=['virat', 'kohli', 'kiran', 'raju'], runs=[91, 45, 67, 78]

4. Write a program to create a pie chart using: players=['A', 'B', 'C', 'D'], runs=[20, 45, 30, 5]

5. Write a program to display a line chart for points (2,5) to (9,10).

6. Write a program to display a scatter plot for points (2,5), (9,10), (8,3), (5,7), (6,18).

You might also like