ThatQuiz Test Library Take this test now
OA reviewer PROG.
Contributed by: Mc G'nnagale
  • 1. 1.
    How do you access the active worksheet?
A) wb.active <
B) None of These
C) wb.sheet
D) wb.current
E) wb.main
  • 2. 2. What does the geometry("300x200") method do?
A) Sets the window size
B) Sets the font size
C) Sets padding
D) Sets the widget size <
E) None of These
  • 3. 3. Which function is often used to trigger saving Excel data in a Tkinter app?
A) Button command <
B) Menu bind()
C) Label text()
D) None of These
E) Entry get()
  • 4. 4. How do you create a new sheet?
A) wb.insert("NewSheet")
B) wb.add("NewSheet")
C) None of These
D) wb.create_sheet("NewSheet") <
E) wb.new_sheet("NewSheet")
  • 5. 5. Which widget is best to show Excel data in Tkinter?
A) None of These
B) Treeview() <
C) Label()
D) Listbox()
E) Text()
  • 6. 6. Which parameter controls text color?
A) color
B) front
C) None of These
D) text_color
E) fg <
  • 7. 7. What method saves the workbook to a file?
A) export("file.xlsx")
B) None of These
C) close("file.xlsx")
D) save("file.xlsx") <
E) write("file.xlsx")
  • 8. 8. How do you iterate over all rows?
A) for row in ws.loop_rows():
B) for row in ws.iter_rows(): <
C) for row in ws.allrows():
D) for row in ws.rows():
E) None of These
  • 9. 9. Which object represents a single sheet in OpenPyXL?
A) Workbook
B) Worksheet <
C) Row
D) None of These
E) Cell
  • 10. 10. What function creates the main application window?
A) Root()
B) Main()
C) None of These
D) Tk() <
E) Window()
  • 11. 11. What does root.mainloop() do?
A) Closes the window
B) None of These
C) Loads external files
D) Keeps the window open and listens for events <
E) Runs only once
  • 12. 12. What function is used to open an existing Excel workbook?
A) excel_load()
B) load_workbook() <
C) open_excel()
D) read_file()
E) None of These
  • 13. 13. How do you read data from a cell?
A) ws.fetch("A1")
B) ws.get("A1")
C) ws["A1"].value <
D) ws.read("A1")
E) None of These
  • 14. 14. Which attribute gives the maximum number of rows used?
A) ws.length
B) ws.rows
C) ws.max row <
D) None of These
E) ws.rowcount
  • 15. 15. What is OpenPyXL used for?
A) None of These
B) Creating PDFs
C) Working with Excel files in Python <
D) Connecting to databases
E) Web scraping
  • 16. 16. How do you make a column heading bold in OpenPyXL?
A) Use Style(bold=True)
B) None of These
C) Use Font(bold=True) <
D) Use Header(bold=True)
E) Use Text(bold=True)
  • 17. 17. Which OpenPyXL function reads all cells in a row?
A) loop_rows()
B) None of These
C) rows()
D) iter_rows() <
E) get_row()
  • 18. 18. Which attribute gives the maximum number of columns used?
A) ws.colcount
B) None of These
C) ws.cols
D) ws.max_column <
E) ws.width
  • 19. 19. What do you call the top-level window in Tkinter?
A) Tk() <
B) Shell()
C) Frame()
D) None of These
E) Main()
  • 20. 21. What file type does OpenPyXL NOT support?
A) .CSV
B) .xltx
C) .xlsm
D) None of These
E) .xls <
  • 21. 22. Which widget allows single-line text input?
A) None of These
B) Entry() <
C) Text()
D) Button()
E) Label()
  • 22. 23. What method is used to place widgets using absolute positioning?
A) place() <
B) grid()
C) pack()
D) None of These
E) align()
  • 23. 25. What function is used to clear all contents of a Text widget?
A) clear()
B) None of These
C) remove()
D) delete("1.0", END) <
E) reset()
  • 24. 27. What function opens a file dialog to select a file?
A) askfile()
B) filedialog.askopenfilename() <
C) None of These
D) selectfile()
E) browse()
  • 25. 28. Which widget is used to display images?
A) None of These
B) Text()
C) Canvas()
D) Label() with Photolmage <
E) Button()
  • 26. 29. How do you write data to a cell?
A) ws.cell("A1").write("Hello")
B) None of These
C) ws.set("A1", "Hello")
D) ws.put("A1", "Hello")
E) ws["A1"] = "Hello" <
  • 27. 30. How do you change the window title?
A) None of These
B) root.text("My App")
C) root.caption("My App")
D) root.name("My App")
E) root.title("My App") <
  • 28. 31. Which Tkinter widget can be used to make a scrollable text box?
A) Label()
B) Text() with Scrollbar() <
C) None of These
D) Canvas()
E) Entry()
  • 29. 32. What is the file extension for Excel workbooks used in OpenPyXL?
A) .xlsx <
B) None of These
C) .xls
D) .txt
E) .CSV
  • 30. 33. Which method arranges widgets in rows and columns?
A) pack()
B) place()
C) None of These
D) grid() <
E) layout()
  • 31. 34. What parameter in Button() defines the action when clicked?
A) event
B) onClick
C) None of These
D) command <
E) function
  • 32. 35. Which method merges cells?
A) ws.combine("A1:B1")
B) ws.merge("A1:B1")
C) ws.merge_cells("A1:B1") <
D) None of These
E) ws.join("A1:B1")
  • 33. 36. Which method creates a new Excel workbook?
A) Workbook() <
B) Excel()
C) NewExcel()
D) None of These
E) CreateBook()
  • 34. 37. How do you insert a new row at the top?
A) ws.add_row(1)
B) ws.top_row()
C) ws.insert_rows(1) <
D) ws.new_row(1)
E) None of These
  • 35. 38. What event triggers when a Tkinter button is clicked?
A) command <
B) event()
C) click()
D) None of These
E) onPress()
  • 36. 39. To automatically update Excel when a button is pressed, which command is used?
A) Button command=function_name <
B) None of These
C) Label text=function_name
D) Menu run-function_name
E) Entry onChange=function_name
  • 37. 40. What library must be imported for Treeview?
A) from tkinter import ttk <
B) import view
C) None of These
D) from tkinter import tree
E) import tree
  • 38. 41. How do you get all sheet names?
A) None of These
B) wb.sheetnames <
C) wb.sheets()
D) wb.names
E) wb.list()
  • 39. 42. Which command imports the OpenPyXL module?
A) None of These
B) import pyexcel
C) import openpyxi <
D) from openxi import *
E) from excel import *
  • 40. 43. Which Tkinter widget is ideal for entering Excel filenames?
A) None of These
B) Label()
C) Text()
D) Frame()
E) Entry() <
  • 41. 44. What parameter in Label() sets the displayed text?
A) None of These
B) text <
C) value
D) caption
E) label
  • 42. 46. How do you show a success message after saving a file?
A) label.set()
B) print("Saved")
C) messagebox.showinfo() <
D) alert()
E) None of These
  • 43. 48. What widget is used to display text or labels?
A) Text()
B) None of These
C) Entry()
D) Label() <
E) Canvas()
  • 44. 49. How do you get a specific sheet by name?
A) wb.sheet("Sheet1")
B) None of These
C) wb["Sheet1"] <
D) wb.get("Sheet1")
E) wb.active("Sheet1")
  • 45. 50. Which module provides styling tools in OpenPyXL?
A) openpyxl.format
B) None of These
C) openpyxl.color
D) openpyxl.design
E) openpyxl.styles <
  • 46. 52. Which widget allows users to select from a list of options?
A) None of These
B) Menu()
C) Choice()
D) Combo()
E) Listbox() <
  • 47. 53. Which function closes a workbook?
A) wb.stop()
B) wb.end()
C) wb.close() <
D) None of These
E) wb.finish()
  • 48. 54. How can you disable an Entry widget after saving data?
A) entry.off()
B) entry.config(state="disabled") <
C) entry.freeze()
D) None of These
E) entry.hide()
  • 49. 55. How do you reopen a workbook after saving in OpenPyXL?
A) None of These
B) read_workbook("file.xlsx")
C) wb.open("file.xlsx")
D) get_book("file.xlsx")
E) load_workbook("file.xlsx") <
  • 50. 21. What file type does OpenPyXL NOT support?
A) .xlsm
B) .CSV
C) .xls <
D) .xltx
E) None of These
Created with That Quiz — where a math practice test is always one click away.