CSCICMPE 4341 Topic Programming in Python Chapter 9

  • Slides: 6
Download presentation
CSCI/CMPE 4341 Topic: Programming in Python Chapter 9: Python XML Processing – Exercises Xiang

CSCI/CMPE 4341 Topic: Programming in Python Chapter 9: Python XML Processing – Exercises Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 lianx@utpa. edu 1

Objectives • In this chapter, you will do some exercise about: – Graphical User

Objectives • In this chapter, you will do some exercise about: – Graphical User Interfaces (GUIs) in Python – Python XML processing 2

Multiple Choices • Labels are defined with class ____, which is a subclass of

Multiple Choices • Labels are defined with class ____, which is a subclass of Widget – A. Labels B. Label C. Text. Box D. Text • Text Box display texts and can be defined by ___ class. – A. Text. Box B. Button C. Entry D. Checkbutton • Method _____displays text in a text box. – A. enter() B. insert() C. display() D. to. String() • Method _____ displays a message dialog. – A. display() B. method() C. showinfo() D. message. Box() • A _____ is a component that the user clicks to trigger an action. – A. Textbox B. Entry C. Label D. Button 3

Multiple Choices (cont'd) • In XML, _____ help avoid naming collisions. – A. naming

Multiple Choices (cont'd) • In XML, _____ help avoid naming collisions. – A. naming conventions B. inheritances C. namespaces D. data declarations • The tags of XML data are enclosed by: – A. { } B. < > C. [ ] D. ( ) • Each end tag of XML data contains ____ character. – A. B. // C. / D. & • An XML document can contain _____ tags. – A. only 1 B. <10 C. >=1 D. None of the above 4

True/False Statements • All tkinter classes inherit from Frame. • A Label displays only

True/False Statements • All tkinter classes inherit from Frame. • A Label displays only text. • The Entry component creates multiple-line text areas. • The Check. Box component creates a check box in the window. • Event <Enter> handles the event in which a mouse is clicked. 5

True/False Statements (cont'd) • XML data are not case sensitive. • An XML document

True/False Statements (cont'd) • XML data are not case sensitive. • An XML document may contain only one root element. • XML is a programming language. • XML is a formatting language. • XML documents must have the. xml extension. 6