1. 学ぶ
  2. /
  3. コース
  4. /
  5. Object-Oriented Programming in Python

Connected

演習

Exploring object interface

The best way to learn how to write object-oriented code is to study the design of existing classes. You've already learned about exploration tools like type() and dir().

Another important function is help(): calling help(x) in the console will show the documentation for the object or class x.

Most real world classes have many methods and attributes, and it is easy to get lost, so in this exercise, you will start with something simpler. We have defined a class, and created an object of that class called mystery. Explore the object in the console using the tools that you learned.

指示1 / 3

undefined XP
    1
    2
    3

質問

What class does the mystery object have?

選択肢