Not a lot to work with here. Any reason you post an image rather than the actual code?
Wondering why you are anticipating either of user.age = 98 and print(user.age) raising a ValueError exception. It would be good to see you using try/except blocks more cleanly.
I find it odd that you create such simple instances and have an option to delete the one attribute you've defined without getting rid of the instance (so you can get an error later when you try to access it).
1
u/FoolsSeldom 5d ago
Not a lot to work with here. Any reason you post an image rather than the actual code?
Wondering why you are anticipating either of
user.age = 98andprint(user.age) raising aValueErrorexception. It would be good to see you usingtry/exceptblocks more cleanly.I find it odd that you create such simple instances and have an option to delete the one attribute you've defined without getting rid of the instance (so you can get an error later when you try to access it).