Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Count Explicit Tracks | Section 3
Python - Music

Deslize para mostrar o menu

book
Count Explicit Tracks

Tarefa

Swipe to start coding

Complete a function that counts the number of tracks marked as explicit from a list of tracks. Each track is represented as a dictionary containing various fields, including an explicit field that indicates whether the track is explicit.

Inputs:

  • tracks: A list of dictionaries, where each dictionary represents a track and contains at least the following field:
    • explicit: A boolean indicating whether the track is explicit.

Steps:

  • Iterate Through Tracks:
    • Loop through each track in the tracks list.
    • For each track, check the value of the explicit field.
    • If the explicit field is True, increment explicit_count by 1.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
py

solution.py

py

main.py

Sentimos muito que algo saiu errado. O que aconteceu?

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

book
Count Explicit Tracks

Tarefa

Swipe to start coding

Complete a function that counts the number of tracks marked as explicit from a list of tracks. Each track is represented as a dictionary containing various fields, including an explicit field that indicates whether the track is explicit.

Inputs:

  • tracks: A list of dictionaries, where each dictionary represents a track and contains at least the following field:
    • explicit: A boolean indicating whether the track is explicit.

Steps:

  • Iterate Through Tracks:
    • Loop through each track in the tracks list.
    • For each track, check the value of the explicit field.
    • If the explicit field is True, increment explicit_count by 1.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Sentimos muito que algo saiu errado. O que aconteceu?
some-alt