+ 6
How to solve the finance app test on python
11 odpowiedzi
+ 5
Share your attempt. Let me know what you find confusing.
+ 5
i just explained how to fix it 🤔
You need to change line 4 as I suggested in my previous response and change line 13 to this:
message = ("Amount in 1 year: " + total)
+ 4
There are two things you need to correct in your code:
1. On line 4 you should convert 'savings' into a float. This is because when you take the input() on line 2, Python stores the value as a string by default.
savings = float(savings)
2. You need to add a space just before the closing quote so that there is a space between your text and the balance in your output.
+ 1
Hi Anastasia Xydia,
You should start a new topic by going to 'DISCUSS => +New Post' and post your code so I or someone else can help you 👍
0
Or u can see the finance test on the python
0
Can you just share the code to solve that pls
0
Thanku
0
I did it 👍🏻thanks
0
savings
savings = input()
# Convert the user input into a float value and update the variable
savings = float(savings)
# Savings grow after 1 year at a 5% annual interest rate
balance = savings * 1.05
# Convert the balance into a string and update the variable
balance = str(balance )
# Concatenate the 2 strings to produce a message
message = "Amount in 1 year: " + balance
# Display the message
print(message
0
Omg finaly i can finish this test tysm