How to add an integer to this sentence?

437 Views Asked by At

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."
2

There are 2 best solutions below

3
On BEST ANSWER

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.")
1
On

val = input("How much did you make this year:")

print("Expect to pay "+str(0.04*float(val))+ " in taxes this year.")