p
y
c
h
a
l
l
e
n
g
e
r
Home
Intermediate Python
Classes and OOP I
Classes and OOP I
classes
objects
OOP
__init__
self
instance methods
class attributes
__str__
object-oriented programming
NEXT
Classes and Objects
LESSON
Define a Class
CHALLENGE
Create Two Instances
CHALLENGE
Add Attributes to an Instance
CHALLENGE
Check Instance Type
CHALLENGE
Define a Class from Scratch
CHALLENGE
Define a Class and Create an Instance
CHALLENGE
The __init__ Method
LESSON
Init with One Parameter
CHALLENGE
Init with Two Parameters
CHALLENGE
Init with Default Parameter
CHALLENGE
Create a Book Class
CHALLENGE
Computed Attribute in __init__
CHALLENGE
Write the Full __init__ Body
CHALLENGE
Instance Methods
LESSON
Define a Simple Method
CHALLENGE
Call a Method and Store Result
CHALLENGE
Method that Modifies State
CHALLENGE
Method with Extra Parameters
CHALLENGE
Method that Returns a Boolean
CHALLENGE
Write a Full Method Body
CHALLENGE
Write a Withdraw Method
CHALLENGE
Class Attributes
LESSON
Access a Class Attribute
CHALLENGE
Class Attribute as Counter
CHALLENGE
Class vs Instance Attribute
CHALLENGE
Define a Class Attribute
CHALLENGE
Use a Class Attribute in a Method
CHALLENGE
Modify a Class Attribute
CHALLENGE
The __str__ Method
LESSON
Implement __str__
CHALLENGE
__str__ with Formatted Numbers
CHALLENGE
__str__ for an RGB Color
CHALLENGE
Write the Full __str__ Return
CHALLENGE
Use str() in an Expression
CHALLENGE
Class with a List Attribute
CHALLENGE
Class with a Dictionary Attribute
CHALLENGE
Objects in a Loop
CHALLENGE
Method with Conditional Logic
CHALLENGE
List Comprehension over Objects
CHALLENGE
Exam: Classes and OOP I
EXAM