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

Practical File

The document outlines a practical file containing various programming tasks, including calculating average marks, classifying age groups, evaluating password strength, and performing operations on numbers and strings. It also covers advanced topics such as exception handling, inheritance, and data manipulation using libraries like NumPy and pandas. Each task is designed to enhance programming skills in Python through practical implementation.

Uploaded by

aanku5835
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)
3 views1 page

Practical File

The document outlines a practical file containing various programming tasks, including calculating average marks, classifying age groups, evaluating password strength, and performing operations on numbers and strings. It also covers advanced topics such as exception handling, inheritance, and data manipulation using libraries like NumPy and pandas. Each task is designed to enhance programming skills in Python through practical implementation.

Uploaded by

aanku5835
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

PRACTICAL FILE

1. Write a Program to calculate average marks of a student.(5 subjects) Hint- add marks of all
five subjects divide by 5
2. Write a program to input a number and print whether it is positive, negative, or zero.
3. Input marks (5 Subjects) from the user , calculate average and print the grade based on the
following scale of average marks:
 A: 90 and above
 B: 80–89
 C: 70–79
 D: 60–69
 F: Below 60
4. Write a program that takes a person’s age and classifies them as:
 Child (0–12)
 Teen (13–19)
 Adult (20–59)
 Senior (60+)
5. Input three numbers and print the largest one.
6. Input two numbers and an operator (+, -, , /). Perform the operation based on the operator.
7. Ask the user to input a password and evaluate its strength:
 Weak (less than 6 characters)
 Medium (6–10 characters)
 Strong (more than 10 characters with symbols)
8. Print Multiplication Table of a Given Number
 Input: A number n
 Output: n x 1 = n …….
9. Print Even and Odd Numbers between 1 and 100
 Output: Two lists, one for even numbers, one for odd
10. Count Vowels in a String
 Input: A string
 Output: Number of vowels
11. Write a program to reverse a string.
12. Accept a string and check if it is a palindrome (e.g., "madam").
13. Write a program to search for an element in a list.
14. Write a program to find the sum and average of elements in a list.
15. Write a program to demonstrate functions with and without return values.
16. Write a program to demonstrate variable-length arguments using *args.
17. Write a program to demonstrate global and local variables.
18. Write a program to handle division by zero using exception handling.
19. Write a program to handle multiple exceptions using try-except.
20. Write a program demonstrating the use of finally block.
21. Write a program using constructor (__init__) to initialize object values.
22. Write a program to demonstrate inheritance in Python.
23. Write a program to create and display 1D and 2D arrays using NumPy.
24. Write a program to perform basic operations (addition, multiplication) on arrays.
25. Write a program to create a DataFrame and Series from a dictionary.
26. Write a program to read data from a CSV file using pandas.

You might also like