Song Class Design

Design a Song class with a constructor taking title, artist and duration_seconds, and a method format_duration() that returns the duration as a "m:ss" string (seconds always shown as exactly two digits, e.g. 245 seconds → "4:05").

Read title, artist and duration_seconds from input, create a Song, and print the result of format_duration().

main.py
Loading editor…

Console

Run your code to see output here.