8-задание выполнено

This commit is contained in:
Neuf
2025-09-15 20:26:50 +05:00
parent ef5b656a22
commit 1bb29cfb72

View File

@@ -11,3 +11,15 @@ violator_songs = [
] ]
# TODO здесь писать код # TODO здесь писать код
summ_time = 0.00
amount = int(input('Сколько песен выбрать? '))
for i in range(1, amount + 1):
song = input(f'Название {i}-й песни: ')
for song_option in violator_songs:
if song_option[0] == song:
summ_time += song_option[1]
break
print(f'Общее время звучания песен: {round(summ_time, 2)} минуты')