0
finance app
Edit3: my problem solved https://code.sololearn.com/ceMWgwrE43fS/?ref=app
6 Respostas
+ 3
Dmitry Yazov, this must be a Code Coach task that I haven't seen yet. I noticed that the program does not take input from the user, which is contrary to what the comment says. Also I noticed that every value is hard-coded, and none of the variables are used. My guess is that you need to fix the code to take input from the user and use the variables in place of hard-coded values. You may also remove the extraneous sets of parentheses, or leave them there if it pleases you. They are not a problem.
+ 2
# Asks the user to enter the savings
savings = 150
# Convert the user input into a float value and update the variable
savings = float (150)
# 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(157.5))
# Concatenate the 2 strings to produce a message
message = "Amount in 1 year: " + balance
# Display the message
print (message )
I don't think there's supposed to be a bracket before "float" .
here, run this
+ 1
Dmitry Yazov it seems to run without any error. What problem are you seeing?
0
I could run your without errors, just edited the print(message ) to print(message).
Mind you..im a newbie.
0
Asks the user to enter the 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 = 157.5
balance = str(balance )
# Concatenate the 2 strings to produce amessage
message = "Amount in 1 year: " + str(balance)
# Display the message
print (message)
Can anyone explain how I got it wrong my test is not running?
0
The instructions on this were overly complicated, it could have been explained much better. If you were doing fine before this test, keep your head up this was just a really bad how to.