0
Where did mess up....
I'm not getting what it wants me to do.. # Asks the user to enter the savings savings = input("Enter your savings:") # Convert the user input into a float value and update the variable savings = float(input("Enter your 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) Pls help..
3 Respuestas
0
In the second line of code, you need to write savings=float(savings) instead of savings=float(input()).
+ 3
Did the task come with the text "enter your savings", or did you add that?
Look closely at your 2nd line of coding (ignoring comments). Do you need input 2x? *hint: maybe that's the line to change
0
Thanks..
I was writing it 2 times..
This is the correct code according to the question
# 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 = str(balance)
# Concatenate the 2 strings to produce a message
message = "Amount in 1 year: " + balance
# Display the message
print(message)