Python Object-Oriented Python Dice Roller Compare and Contrast

Bashir Orfani
Bashir Orfani
12,495 Points

We'd like to compare songs by their length, which is measured in whole seconds. Create an __int__ method that should ret

We'd like to compare songs by their length, which is measured in whole seconds. Create an int method that should return the length of the song. Then, create the following comparison methods: eq, lt, gt, le and ge.

songs.py
class Song:
    def __init__(self, artist, title, length):
        self.artist = artist
        self.title = title
        self.length = length
Steven Parker
Steven Parker
201,913 Points

This looks like the same info we can see in the "View Challenge" link. Did you want to ask a question about it?