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