0

Introduction to python finance app practice

im confused on what to put or how to solve! please help!

24th Jul 2023, 4:03 AM
Elaine Taulbee
Elaine Taulbee - avatar
2 Respostas
+ 6
Elaine Taulbee They first want you to input savings as a string svgs = input() Then convert the string to a float f_svgs = float(svgs) figure an annual interest rate at 5% or 1.05 bal = f_svgs * 1.05 Convert the balance into a string and update the variable s_bal = str(bal) Then concatenation the two strings message = "Amount in 1 year: " + s_bal print(message) * The intent of the exercise is to see how much you learned from the previous material you completed.
24th Jul 2023, 4:30 AM
BroFar
BroFar - avatar
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 = (str(balance)) # Concatenate the 2 strings to produce a message message = "Amount in 1 year: " + balance # Display the message print (message) Isn't this way easier?
3rd Nov 2023, 6:57 PM
Jay Pham
Jay Pham - avatar