Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Revenue Calculation | Syntax and Basic Operations
R Introduction

bookChallenge: Revenue Calculation

Task

Swipe to start coding

Use variables to calculate projected revenue from a deposit with compound interest:

  1. With the variables initial_money, interest_rate, and n_years, compute the value of the deposit after 4 years and store it in a variable named revenue;
  2. Print the result in the format:
    Accrued amount: number
    

The formula for revenue is:

initial_money * (1 + interest_rate / 100) ^ n_years

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 9
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain this in simpler terms?

What are the main takeaways from this?

Can you give me a real-world example?

close

Awesome!

Completion rate improved to 2.27

bookChallenge: Revenue Calculation

Swipe to show menu

Task

Swipe to start coding

Use variables to calculate projected revenue from a deposit with compound interest:

  1. With the variables initial_money, interest_rate, and n_years, compute the value of the deposit after 4 years and store it in a variable named revenue;
  2. Print the result in the format:
    Accrued amount: number
    

The formula for revenue is:

initial_money * (1 + interest_rate / 100) ^ n_years

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 9
single

single

some-alt