Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the @property decorator allow?

  1. A Accessing a method as though it were an attribute
  2. B Making an attribute read-only permanently
  3. C Creating a class variable
  4. D Declaring a static field
Answer

Accessing a method as though it were an attribute

Properties allow computed attributes and validation on assignment without changing the public interface that callers already use.

All Python MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as