Why does the following assignment statement generate an error?

>>> x.y = 5
Traceback (most recent call last):
File "", line 1, in
NameError: name 'x' is not defined


The x.y is not a valid name; Python parses it as “apply method y to object
x.” Python reports that x is not defined.

Computer Science & Information Technology

You might also like to view...

A relational database model allows relationships between data to be considered without concern for the ________.

a) meaning of the data b) structure of the data c) application of the data d) All of the above

Computer Science & Information Technology

Four types of filters are available in Access: Filter By Selection, Common Filters, Filter By Form, and Advanced Filter/Sort.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

All Web browsers use the _______________.

A. Hypertext Transfer Protocol (HTTP) B. Internet Message Access Protocol (IMAP) C. Integrated Services Digital Network (ISDN) D. Post Office Protocol 3 (POP3)

Computer Science & Information Technology

A __________ VPN deals with a specific single connection between two machines using VPN software or hardware.

A. host-to-site B. client/server C. site-to-site D. host-to-host    

Computer Science & Information Technology