Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: CSV Data Processing | Working with Structured Data Formats
Working with Strings and Data Formats

bookChallenge: CSV Data Processing

Tarefa

Swipe to start coding

Write a function that takes a CSV-formatted string containing names and ages, and returns the average age as a float. The CSV string will have a header row with the columns "name" and "age", followed by rows of data. The function should extract the ages, calculate the average, and return the result as a float.

  • Parse the csv_string to extract the age values from each row.
  • Compute the average of the extracted ages.
  • Return the average as a float.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

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

close

Awesome!

Completion rate improved to 6.67

bookChallenge: CSV Data Processing

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a function that takes a CSV-formatted string containing names and ages, and returns the average age as a float. The CSV string will have a header row with the columns "name" and "age", followed by rows of data. The function should extract the ages, calculate the average, and return the result as a float.

  • Parse the csv_string to extract the age values from each row.
  • Compute the average of the extracted ages.
  • Return the average as a float.

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 4
single

single

some-alt