class Song(object):
def _init_(self, lyrics):
self.lyrics =lyrics
def sing_me_a_song(self):
for line in self.lyrics:
print(line)
happy_bday= Song(["Happy birthday to you","i don't want to get sued","so i'll stop right there"])
bulls_on_parade = Song(["they rally aroung tha family","with pockets full of shells"])
happy_bday.sing_me_a_song()
bulls_on_parade.sing_me_a_song()
cho em hỏi đoạn code thế này khi chạy thì nó báo lỗi dòng happy_bday = song…
báo là take no arguments . lỗi này như thế nào và em sửa như thế nào ạ. em cám ơn
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?