یلدا ادامه داره... ❤️ ۴۰ درصد تخفیف همه دورهها
استفاده از تخفیفهاclass *****:
def init(self, name, singer, zhanr):
self.name = name
self.singer = singer
self.zhanr = zhanr
def str(self):
return f"name of *****: {self.name}, name of singer: {self.singer}, zhanr of *****: {self.zhanr}"
class playlist:
def init(self):
self._list = []
def add_music(self, *****):
self._list.append(*****)
def del_music(self, music_name):
for i in self._list:
if i.name == music_name:
self._list.remove(i)
def show(self):
for i in self._list:
print(i)
num = 1
playlistm = playlist()
number = 1
while number <= 45:
playlistm.show()
a = input("del or add? (deel = 1, add = 2): ")
if a != 2:
playlistm.show()
num = 1
count_add_music = int(input("tedad adad baray add: "))
while num <= count_add_music:
playlistm.show()
name_music = input("name of *****: ")
singer_music = input("singer of musics: ")
zhanr_music = input("zhanr of *****: ")
num += 1
playlistm.add_music(name_music, singer_music, zhanr_music)
playlistm.show()
else:
playlistm.show()
num = 1
count_del_music = int(input("tedad adad baray del: "))
while num <= count_add_music:
playlistm.show()
name_music = input("name of *****: ")
singer_music = input("singer of musics: ")
zhanr_music = input("zhanr of *****: ")
num += 1
playlistm.del_music(name_music, singer_music, zhanr_music)
playlistm.show()
به مصطفی معماری کمک کنید تا مشکل خودش را حل کند؛ اینطور میتوانیم با هم پیشرفت کنیم.
آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟