Python Programming Question Bank

 

Python Programming Question Bank

1. What is range() method in Python. How range() is used with loop? Explain with example

2. Explain break statement, continue statement, pass statement and else statement in Python with an example

3. Write short note on type conversion in Python

4. Mr. Kunal started IT firm by taking a loan from the bank of 1Cr at a rate of interest of 8.5 for 10 years. Mr. Mahesh has selected a place to run his IT firm on a rent of 25000/-. Per month He has hired 2 Engineers for his firm with a monthly salary of 30000/- per engineer.  Mahesh has other monthly expenses of 10000. Per year he gets 3-5 projects of 2 lakhs per project. Calculate simple interest on the Loan he has taken Calculate all monthly expenses including EMI Calculate yearly profit and loss

5. What are conditional statements/decision-making statements in Python? Explain with example

6. What are branching statements in Python? Explain with example

7. What is loop? Explain loop structure in Python?

8. What are iterative statements in Python? Explain with example

9. What is function? Explain function in Python

10. Explain function parameters in Python

11. Write short note on return statement in Python

12. What is lambda function in Python? Explain it with example

13. What is anonymous function in Python. Explain with example

14. Demonstrate recursive function in Python. calculate factorial of user input using recursion

15. Explain commonly used packages and libraries with an example

16. Explain user defined modules and packages with example.

17. Recursion is a process that calls itself. Explain this statement with syntax and an example

18. What is string? Explain strings with different methods

19. 2.     What is list data structure in Python? Explain methods of list with example

20. 3.     What is tuple data structure in Python? Explain all methods of tuple data structure

21. 4.     What is set data structure? Explain all methods with example

22. What is dictionary data structure? Explain dictionary with methods

23. Create dictionary Result_Analysis with 5 key value pairs. Perform the following,

Keys are – Python, C++, ADBMS, PHP, Soft Computing

Values are- 67, 58, 69, 66, 28 respectively

Calculate total marks, Calculate percentage, Display results in four grades,

 If the percentage is greater than 80 print ‘Outstanding Performance’

if the percentage is greater than 70 and less than 80 print ‘Excellent Performance’

if the percentage is greater than 60 and less than 70 First Class’

if the percentage is greater than 40 and less than 60 print ‘Student is just passed in Examination’

otherwise print ‘student is failed in Examination’

24. What are Built in data structures in Python? Explain with example 

25. What is file? Explain operation on file in Python

26. Write short note on open , read and close operation of file in Python

27. Explain read(), readline() and readlines() method in file handling

28. What is class? Create class employee and calculate employee net salary

29. Demonstrate write and append methods in Python with example

30. Explain rename() and remove() method with syntax and example

31. What is use of exception handling in Python? Explain with syntax and example

32. What is inheritance in Python? Explain single, multiple, multilevel inheritance with example

33. What is inheritance? Explain types of Inheritance with example

34. What is operator overloading? Explain arithmetic operator overloading with example

35. Explain __init__() method and __del__() method in Python with example

36. Explain constructor and destructor in Python


1.     

टिप्पणी पोस्ट करा

0 टिप्पण्या