0
Introduction to python finance app practice
im confused on what to put or how to solve! please help!
2 Antworten
+ 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.
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?