You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
619 B
31 lines
619 B
### @export "import"
|
|
import ex26
|
|
|
|
### @export "step1"
|
|
print("name", ex26.name)
|
|
print("height", ex26.height)
|
|
|
|
### @export "step2a"
|
|
from pprint import pprint
|
|
|
|
pprint(ex26.__dict__)
|
|
|
|
### @export "step2b"
|
|
print("height is", ex26.height)
|
|
print("height is also", ex26.__dict__['height'])
|
|
|
|
### @export "step3"
|
|
print(f"I am currently {ex26.height} inches tall.")
|
|
|
|
ex26.__dict__['height'] = 1000
|
|
print(f"I am now {ex26.height} inches tall.")
|
|
|
|
ex26.height = 12
|
|
print(f"Oops, now I'm {ex26.__dict__['height']} inches tall.")
|
|
|
|
### @export "step4a"
|
|
from pprint import pprint
|
|
print(pprint.__doc__)
|
|
|
|
### @export "step4b"
|
|
help(pprint)
|
|
|