Search code examples
pythonintegerconditional-statementsmultiplicationmoney-format

How to add an integer to this sentence?


I am trying to make python run a statement that looks like this.

"How much did you make this year: " #Enter amount here in cash

"Expect to pay (4% of your amount in cash) in taxes this year."

Solution

  • You can use the following code:

    pay = int(input("How much did you make this year:"))
    print(f"Expect to pay {pay * 0.04} in taxes this year.")