Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Earnings Forecaster | Optimizing Freelance Business with Python
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Freelancers

bookChallenge: Earnings Forecaster

Forecasting your freelance earnings is an essential practice for financial planning and maintaining business stability. By leveraging Python, you can automate this process and quickly identify potential shortfalls before they become issues. In this chapter, you will build a script that takes hardcoded data for your past monthly earnings and upcoming project payments, calculates projected totals for each month in the next quarter, and displays a summary table. You will also highlight any months where projected earnings fall below a threshold you set, helping you proactively address lean periods.

Tarefa

Swipe to start coding

Complete the script to forecast your freelance earnings for the next quarter using the provided hardcoded data.

  • Calculate the total projected earnings for each upcoming month based on the values in upcoming_projects;
  • Create a pandas DataFrame named df with columns Month and Projected Earnings;
  • Add a column Below Threshold to flag months where projected earnings are less than the value of threshold;
  • Print the DataFrame as a string with no index using print(df.to_string(index=False)).

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 7
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

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

Suggested prompts:

Can you show me how to structure the hardcoded data for past earnings and upcoming payments?

How do I set the earnings threshold in the script?

Can you explain how to highlight months with low projected earnings?

close

bookChallenge: Earnings Forecaster

Deslize para mostrar o menu

Forecasting your freelance earnings is an essential practice for financial planning and maintaining business stability. By leveraging Python, you can automate this process and quickly identify potential shortfalls before they become issues. In this chapter, you will build a script that takes hardcoded data for your past monthly earnings and upcoming project payments, calculates projected totals for each month in the next quarter, and displays a summary table. You will also highlight any months where projected earnings fall below a threshold you set, helping you proactively address lean periods.

Tarefa

Swipe to start coding

Complete the script to forecast your freelance earnings for the next quarter using the provided hardcoded data.

  • Calculate the total projected earnings for each upcoming month based on the values in upcoming_projects;
  • Create a pandas DataFrame named df with columns Month and Projected Earnings;
  • Add a column Below Threshold to flag months where projected earnings are less than the value of threshold;
  • Print the DataFrame as a string with no index using print(df.to_string(index=False)).

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

single

some-alt