Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
The print function
Variables
Math in Python
The input function
Summary
21. Question

## Exercise

Write a program that will tell the user how much they can earn on a deposit when compound interest is applied. If you don't know anything about compound interest, follow the instruction below:

Ask the user for the following information: initial_amount, interest_rate, annual compounding_frequency, time – expressed in years.

Then, calculate the final_amount as:

\text{initial\_amount} \cdot \Big(1 + \frac{\text{interest\_rate}}{100 \cdot \text{compounding\_frequency}}\Big)^{\text{compounding\_frequency} \cdot \text{time}}

Show the following sentence: At the end of the period, you will have {final_amount}

We've already prepared the inputs in the Code Editor. Implement the formula and show the sentence.
{"ft_lang_label":"__label__en","ft_lang_prob":0.862298,"math_prob":0.8139291,"size":707,"snap":"2022-40-2023-06","text_gpt3_token_len":163,"char_repetition_ratio":0.13655761,"word_repetition_ratio":0.0,"special_character_ratio":0.22489391,"punctuation_ratio":0.11764706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.996592,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-04T19:32:46Z\",\"WARC-Record-ID\":\"<urn:uuid:72789092-aea4-4ca1-b749-49f1e92d348a>\",\"Content-Length\":\"71638\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:330d5716-36a1-4a16-bb5e-2be9472322df>\",\"WARC-Concurrent-To\":\"<urn:uuid:eddd3cac-779e-4dbb-b4a5-d98277c03d32>\",\"WARC-IP-Address\":\"193.201.34.97\",\"WARC-Target-URI\":\"https://academy.vertabelo.com/course/python-basics-part-1/first-steps/summary/question\",\"WARC-Payload-Digest\":\"sha1:F26BSJHMMA55WSRPJUTLAM265YFZFRVR\",\"WARC-Block-Digest\":\"sha1:IBA2HLCDG6NDPQJG2D3HF47RQ7X3DNOL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500151.93_warc_CC-MAIN-20230204173912-20230204203912-00073.warc.gz\"}"}