Question
import math #prompt from user principle = float(input(Enter the Principal Value of your investment: $ )) time = int(input(Enter the Time(in years) you plan to
import math
#prompt from user principle = float(input("Enter the Principal Value of your investment: $ ")) time = int(input("Enter the Time(in years) you plan to save your investment: ")) rate = float(input("Enter the Rate (2% = 0.02) you will collect on your investment: ")) interest = principle * rate * time final_value = principle + interest
print("The Final Value of your investment will be: $", final_value) format(final_value , '.3f' )
i need the output to be:
Enter the Principal Value of your investment:
Enter the Time(in years) you plan to save your investment:
Enter the Rate (2% = 0.02) you will collect on your investment:
The Final Value of your investment will be: $ 27,500.00
But i cannot figure out how to properly add two decimal places and add the comma
instead im getting:
Enter the Principal Value of your investment: $
Enter the Time(in years) you plan to save your investment:
Enter the Rate (2% = 0.02) you will collect on your investment:
The Final Value of your investment will be: $ 27500.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started