GreatNoise

The music platform GreatNoise.com wants to improve the service it offers to their subscribers. To do this, it will add different functionalities that users will be able to use in their playlists.

A playlist consists of a list of one or more songs, which are both lists with the following elements:

The three statements below are related but can be solved independently, without depending any of them on the solution of the others.

  1. GreatNoise.com wants to show the total duration of a reproduction list. Program a function @calcula_duracion(lista_reproduccion)@ that from @lista_reproduccion@, a list like the ones described at the beginning, returns the total duration in minutes and seconds from the list provided.

  2. GreatNoise.com also wants the user to have more information about the added songs in the list. Program a function @clasificar_duracion(lista_reproduccion)@ that, from from @lista_reproduccion@, a list like the ones described at the beginning, returns a dictionary that counts by duration the songs in the list according to the following criteria:

    1. less than 3 minutes

    2. between 3 and 5 minutes (included)

    3. more than 5 minutes

    Use the letters ’a’, ’b’, and ’c’ as dictionary keys.

  3. Finally, GreatNoise.com wants to calculate statistics on the playlists. Program a function @estadisticas(lista_reproduccion)@ that from @lista_reproduccion@, a list like the ones described at the beginning, returns a dictionary that associates the song titles in the playlist with a list composed by the author and all albums (they can be repeated) in which the song appears in the playlist.

Scoring

Apartado 1: 33 puntos.

Apartado 2: 33 puntos.

Apartado 3: 34 puntos.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T16:27:15.265Z

© Jutge.org, 2006–2026.
https://jutge.org