• 12 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 1/26/21

Write Methods and Classes Using Python

Log in or subscribe for free to enjoy all this course has to offer!

Evaluated skills

  • Write Methods and Classes using Python
  • Question 1

    What is a class?

    • Somewhere data is stored.

    • A variable.

    • A template for an object. 

    • Something you can pass into a function.

  • Question 2

    The difference between a method and a function is:

    • A method is part of an object, while a function isn't.

    • Only methods can take objects as parameters.

    • A function returns a value, but methods don't.

  • Question 3

    Which one of these constructor signatures is correct?

    • def __init__(name, date_of_birth)

    • def __init__(self, name, date_of_birth)

    • def init(self, name, date_of_birth)

    • def __init__(self name date_of_birth)