Your school name
2nd Year Computer Chapter 4 Test2nd Year · Computer · Punjab (PTB)
Q1. Multiple choice questions (Attempt all · 10 × 1 = 10)
Where does sqlite3 store its database data on the system?
When does a function linked to an event run?
GUIs improve usability primarily by providing:
What elements characterize a clean interface?
What parameter in tk.Frame() sets the background color of a frame?
What is the role of the mainloop() function in a Tkinter application?
How are relationships between tables maintained in a relational database?
Why does a Roll Number function as an identifier for the Student entity?
What key benefit does using databases provide regarding data quality?
How is the title of a Tkinter application window set?
Q2. Short questions (Attempt any 6 of 8 · 6 × 2 = 12)
What happens if connection.commit() is omitted after a delete operation?
How user input is processed using widgets and connected functions?
What is meant by an attribute?
Summarize the key advantages of database.
What is meant by responsive interfaces in application design?
What is the role of pady=10 when calling .pack() on a widget?
How does layout management assist in GUI application design?
What is the role of a database cursor in executing SQL commands from Python?
Q3. Long questions (Attempt any 2 of 3 · 2 × 4 = 8)
Write a program to create Simple Login Form in tkinter.
Write out a complete Python program using Tkinter that creates an application window with a title, custom size, label, entry box, and button.
Write a python program to demonstrate the steps to Connect to a Database (sqlite3). Also write code to fetch and display data and steps to Close the connection.