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

Deslize para mostrar o menu

book
Mode Distribution

Tarefa

Swipe to start coding

Complete a function that determines the musical mode of a track based on its mode value. The mode is represented as an integer, where a value of 1 indicates a major mode and a value of 0 indicates a minor mode.

Inputs:

  • mode: An integer representing the mode of the track. It can be either:
    • 1 for major mode.
    • 0 for minor mode.

Steps:

  • Determine Mode: Check the value of the mode input. If mode is 1, the track is in a major mode, otherwise it is in a minor mode.

  • Return the Mode:

    • Return the string 'major' if it is major mode.
    • Return the string 'minor' if it is minor mode.

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 5
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
Mode Distribution

Tarefa

Swipe to start coding

Complete a function that determines the musical mode of a track based on its mode value. The mode is represented as an integer, where a value of 1 indicates a major mode and a value of 0 indicates a minor mode.

Inputs:

  • mode: An integer representing the mode of the track. It can be either:
    • 1 for major mode.
    • 0 for minor mode.

Steps:

  • Determine Mode: Check the value of the mode input. If mode is 1, the track is in a major mode, otherwise it is in a minor mode.

  • Return the Mode:

    • Return the string 'major' if it is major mode.
    • Return the string 'minor' if it is minor mode.

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 5
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