Skip to main content

Practice · 2 of 3

Book with Methods

CHALLENGE
Difficulty: intermediate+25 XP

Create a class Book(title, pages) with a method reading_time(minutes_per_page=2) returning pages * minutes_per_page. Also give it a __repr__ like Book('Title', 100).

Back to lesson: Practice: Class Fundamentals