homework confusion

Jason Friedman jsf80238 at gmail.com
Wed Apr 12 22:47:12 EDT 2017


>
> The example command is: Lockable("diary", "under Sam's bed", tiny_key,
> True)
>
> And I keep getting a NameError: tiny_key is not defined.
>
> What do I do?
>

Without knowing what your professor intends this is a guess:  define
tiny_key.  For example

tiny_key = "some string"
thing = Lockable("diary", "under Sam's bed", tiny_key, True)

or

tiny_key = 1234
thing = Lockable("diary", "under Sam's bed", tiny_key, True)

Maybe in the next assignment the professor will ask you to collect by key
the Lockables that you construct.



More information about the Python-list mailing list