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