[英]Tax discount for item calculator
How do i make a code where user input if rhe item they want has tax and then discount and then they input the percent of discount and all these price are added to the total cost
我如何制作一个代码,如果他们想要的商品有税,然后打折,用户输入,然后他们输入折扣百分比,所有这些价格都加到总成本中
it is an easy concept, it will be something like this:
这是一个简单的概念,它将是这样的:
earnings = int(input("Insert your earnings : "))
taxes = 0.20
if earnings < 10000:
totTaxes = int(earnings * 0.20)
salary = earnings - totTaxes
print("Your Salary is ", salary)
print("The taxes amount are : ", totTaxes)
i think you are new in python, u can copy and run this script on python idle, its a simple python scrpts IDE that executes the scripts this is the link to download it for windows LINK .
我认为你是 python 的新手,你可以在空闲的 python 上复制并运行这个脚本,它是一个简单的 python 脚本 IDE 执行脚本这是下载它的链接 windows LINK 。 Good luck!
祝你好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.