79391495

Date: 2025-01-27 16:38:10
Score: 1
Natty:
Report link

Ask the user for inputs

price_per_kg = float(input("Enter the price (without tax) of one kilogram of tomatoes: ")) kilograms = float(input("Enter the number of kilograms you want to buy: ")) vat_percent = float(input("Enter the VAT in percent: "))

Calculate the total price before tax

total_price_before_tax = price_per_kg * kilograms

Calculate the VAT amount

vat_amount = (total_price_before_tax * vat_percent) / 100

Calculate the total price including VAT

total_price_with_vat = total_price_before_tax + vat_amount

Print the result

print(f"The total price including VAT is: {total_price_with_vat:.2f}")

for more detailed articles you can read on https://vatcalculatorsa.co.za/

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: nidavat