• 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 4/18/24

Write Methods and Classes Using Python

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)

Ever considered an OpenClassrooms diploma?
  • Up to 100% of your training program funded
  • Flexible start date
  • Career-focused projects
  • Individual mentoring
Find the training program and funding option that suits you best