Something with python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Something with python

In sololearn code playground, you dont use this thing “>>>” at the start of some lines, but in other compilers would I have to do that?

25th Jul 2018, 4:28 PM
Nicolass22
Nicolass22 - avatar
4 Answers
+ 3
No, you should never add “>>>”
25th Jul 2018, 4:31 PM
TurtleShell
TurtleShell - avatar
+ 3
">>>" is a just visual prompt used in the interpreter, like in the terminal or command shell (typically the current path).
25th Jul 2018, 5:17 PM
LunarCoffee
LunarCoffee - avatar
+ 1
You only use the >>> when using an interpreter. But on the playground, you don't need those
25th Jul 2018, 4:38 PM
Dlite
Dlite - avatar
0
Your function may not call any of the other functions you've defined in this project. Assume that start_age is an int value, and start_age < 65. Just like in Function 4, calculate the loan as the present value of the future down-payments on the loan, discounted at an interest rate of i% per year. (Use the present value of an annuity formula, a.k.a. discounted cash flow valuation - https://www.investopedia.com/walkthrough/corporate-finance/3/discounted-cash-flow/introduction.aspx) ### START FUNCTION 5 ​ def maximum_home_loan_with_age(PMT, i, n): # YOUR CODE HERE: # FV = some formula PV = PMT /(1 + i/n)**n return PV ​ maximum_home_loan_with_age(15000*12, 0.1045, 35) ### END FUNCTION 5 162164.70959859752 IMPORTANT: Your function needs to return an float value correctly rounded to 2 decimal places. If your answer is not rounded correctly to 2 decimal places, you will receive 0 for the question. Make sure that the following tests all give a True result: maximum_home_loan_with_age(15000*12, 0.1045, 35) maximum_home_loan_with_age(15000*12, 0.1045, 35) == 1635153.79 False maximum_home_loan_with_age(15000*12, 0.1045, 40) == 1578934.73 False
26th Jul 2018, 11:00 AM
Sandisiwe Sizani
Sandisiwe Sizani - avatar