/
sejeenn
/
python_basic
Обзор
Документация
Войти
/
sejeenn
/
python_basic
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Module16/05_songs/main.py
24 строки
738 B
Eugene Vorontsov
Copy repo python basic
03 фев 2025, 20:23
03 фев 2025, 20:23
a8fce4a
Код
Авторство
О чём код?
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] ] how_many = int(input('Сколько песен выбрать? ')) songs = [] for i in range(1, how_many + 1): print('Название', i, 'песни: ', end = ' ') songs.append(input()) count_time = 0.0 for i_find in songs: for i in range(len(violator_songs)): if i_find == violator_songs[i][0]: count_time += violator_songs[i][1] print('\nОбщее время звучания песен:', round(count_time, 2))