Exam
Exam
2. Write a lambda function that takes a number as input and returns 'Even' if the number is
even and 'Odd' if the number is odd.
3. Write a Python program to read a large CSV file and calculate the sum of values in a specific
column.
4. Create a class Employee with attributes like name, id, and salary. Add methods to update salary
and display employee details.
5. Create a class Student to store and display information about students, including name,
roll number, and grade.
6. Create a class Bank Transaction to represent bank transactions with attributes for
transaction type (deposit or withdrawal) and amount. Implement a method to display
transaction details.
7. Write a function to check if a given number is a palindrome.
8. Function to generate the Fibonacci sequence up to a specified number of terms.
9. Write a lambda function to calculate the square of a number.
10. Write Code for below Pattern
1
* ?
2 3 4
* ? * ?
5 6 7 8 9