+ 1
i want to do one of practics in slololearn, i think my code is right but i can't run it.what is the problem?
this is the code: # 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
2 Answers
+ 4
Your code is correct up until the very end. You forgot the print statement đ
https://code.sololearn.com/cO9ZcyzMx25k/?ref=app
Also, if you save your code as a code bit you can share the link into the forum. That way others can copy or make changes to help you.
+ 1
#l am sure this well run:
savings = float(input())
balance = str(savings * 1.05)
message = "Amount in 1 year: " + balance
print(message)