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

Exam

Uploaded by

storage1patel
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)
8 views1 page

Exam

Uploaded by

storage1patel
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
You are on page 1/ 1

Python Practical Interview

1. Write Code for below Pattern


1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
6 12 18 24 30 36
7 14 21 28 35 42 49

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

You might also like