Govt of karnataka
Department of collegiate education
SHRI SHRIPADBOD SWAMIJI GOVERNMENT COLLEGE,
Tq: Moodalagi-591312 Dist: Belagavi
DEPT OF COMPUTER SCIENCE
Python Question Bank
Section -A
Answer the following questions. ( 2-Marks)
1. Define Python.
2. Define Variable.
3. State the rules of defining a variable.
4. Define Tuples. Give an example.
5. Differentiate between Lists and Dictionaries.
6. State the significance of Range()
7. Define Testing.
8. Define Inheritance and Encapsulation.
9. Define Regular Expression.
10. Name any four Tkinter widgets.
11. What is Cursor?
12. Define scalar & non scalar objects?
13. What you mean by Inheritance?
14. What is Exception?
15. What is regular expression?
16. What is Data base?
17. Name Data types in python with examples.
18. Define List and dictionaries with example.
19. What are Assertions.
20. Define Testing. Mention types of testing.
21. Name any two Tkinter widgets with example.
22. Define commit and rollback.
23. What are Ranges?
24. Define Testing? Mention types of testing.
25. What is Assertion in python. Give syntax.
26. Define IDE's of python.
27. Define single query.
28. Define strings in python. Give syntax.
SECTION-B
Answer the following questions for 4marks .
1. Explain Scoping with examples.
2. Explain any five String built-in functions with examples.
3. Differentiate between Block-box and White-box Testing.
4. Explain any five Meta characters with Regular Expressions.
5. Explain steps for Database connectivity in python.
6. Write a syntax to define functions in python? Write a python program using function?
7. Explain any five string methods with an example?
8. Write a python to show draw shapes? (line, rectangle, circle, box etc).
9. Explain any five python features.
10. Explain any five string methods wiht an example.
11. What is Exception handling? Write a python Program on exception handling.
12. Explain any five Meta characters with respective regular expres
13. Write steps for database connectivity in Python.
14. What are objects of python. Explain types of objects with syntax.
15. Explain functions as objects of python?
16. Explain Debugging in python? Discuss types debugging.
17. Discuss (Tkinter) GUI in python.
SECTION-C
Answer the following questions. 10-Marks
1. a) Explain features of python.
b) Explain Recursion with an example
2. Explain any five built-in functions of Dictionaries with example
3. a) Explain Exception Handling in python.
b) Explain Debugging in python
4. Explain any five Widgets related to GUI
5. Explain following terms each:
i) Commit()
ii) Alter table
iii) Update operation
iv) Fetchall ()
v) Delete ()
6. What is recursion explain with a program?
7. What is file? Explain any five file methods?
8. Explain lists and dictionaries with example?
9. a) Explain exception handling mechanism in python?
b) Write a python program to demonstrate use of try, except, finally?
10. Explain any 10 widgets used in aul programming of python?
11. a) Explain while & for loop statements in python?
b) Show how we can match & search characters using regular expression
12. Write steps to connect database in python?
13. a) Explain if and if else statements in python with example.
b) What is recursion?
14. Write a python program to calculate factorial of a given no using recursion.
15. What is Tuple? Explain any 5 built in sunction of tuple with example.
16. Explain the terms with respective python
a Object and class
b. Inheritance
c. Encapsulation
d. Information Hiding.
17. Explain any 5 python widgets related to GUI.
18 . Write a python program to insert and display the Employee details in the database. (Empid,
empname, empaddress).
19 .a) Explain Branching in python.
b) Explain Iteration? Give program example.
20. a) Explain lists and Tuples.
b) Discuss dictionaries in python?
21 . a) Explain Exception handling in python?
b) Explain Inheritance and Encapsulation properties of python?
22 . Explain in detail with examples of any five widgets of python?
23. Explain following terms each.
i) Match
ii) Fetch all ()
iii) Search
iv) Execute functions
v) Connect and cursor.