How do I solve this ? I'm confused | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do I solve this ? I'm confused

# Asks the user to enter the savings savings = input() # 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 = 150.0 *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(157.5) print (message) # Display the message print (message)

18th Oct 2023, 6:48 PM
olawoyin tunji
3 Answers
+ 5
olawoyin tunji , Your coding is right...but you should not hard-code the values... give the variable names in place of values... And one print statement is enough... Here look at this code:- https://code.sololearn.com/cW2qRSUigJdQ/?ref=app
18th Oct 2023, 6:56 PM
Riya
Riya - avatar
+ 2
Thanks
18th Oct 2023, 6:57 PM
olawoyin tunji
0
They gave me the first number as 150 Second 250 And third is 1000. I'm having problems on arrangement. Having done it as you explained they still instructed me to complete the remaining one .
18th Oct 2023, 11:08 PM
olawoyin tunji