25 lines
725 B
Python
25 lines
725 B
Python
violator_songs = [
|
|
['World in My Eyes', 4.86],
|
|
['Sweetest Perfection', 4.43],
|
|
['Personal Jesus', 4.56],
|
|
['Halo', 4.9],
|
|
['Waiting for the Night', 6.07],
|
|
['Enjoy the Silence', 4.20],
|
|
['Policy of Truth', 4.76],
|
|
['Blue Dress', 4.29],
|
|
['Clean', 5.83]
|
|
]
|
|
|
|
# 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)} минуты') |