python给商品打折编程序

@西凝4935:python编程.在冬天一个单位打折,买一件商品打9折,两件8折3件7折,4件6折,写一个程序可以 -
卜性15194353577…… #首先设置未知数 amount = 0 total_cost = 0 money_saved = 0 #设置输入 price = input (“输入价格”:) while price > 0: total_cost = total_cost + price amount +=1 if amount < 4: total_off = total_cost * (1- amount/10.00) #如果有变量 else: total_off =...

@西凝4935:在一天晚上一个面包店打折,买1个面包打9折,2个面包打8折,3个面包打7折.编写一个python程 -
卜性15194353577…… #set the variables amount = 0 money_saved = 0 total_cost = 0 price = input("Enter the price of the bread until entered you entered 0: ")#while statement while price > 0: total_cost = total_cost + price amount +=1 price = input("Enter the price of ...

@西凝4935:1、 分别用if…else if…else if…else结构和switch结构编写商城的打折促销程序: 1000元以下的账单9折 -
卜性15194353577…… 请把问题描述完整 int price,discount ; scanf("d%",&price); if(prince<1000) discount=prince*0.9; else if(1000<=prince<2000) discount=prince*0.9; else if(2000<=prince<5000) discount=prince*0.85; else (prince>=5000) discount=prince*0.8;

@西凝4935:python编写一个python程序可以让你输入面包的价格直到输入0时停止.最后输出面包总的价格和节省的金额. -
卜性15194353577…… 是输入价格吗,价格是定值啊,3个折扣价,应该是输入数量吧,买到手里的钱为0为止.

@西凝4935:书店够书可以打折1.普通顾客购书满100元可以打9折;2会员购书可以打8折;3.会员购书满200可以打7.5折.用if ......slse编写程序,输入你购书的金额·是否是会员,输出你可以享受的优惠 -
卜性15194353577…… using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string Type = "";//顾客种类 double price = 0; //购物金额 Console.WriteLine("请输入会...

@西凝4935:编写一个程序,能计算顾客所打的折扣用户必须输入购买的金额.如果金额大于¥100,可以打2%的折扣;如果金额大于¥500可以打5%的折扣;如果金额大于¥1000可以打10%的折扣;打印出顾客打折后应付的 -
卜性15194353577…… if(int a>0,int b>0) { if a>=100, b=a*(1-2%) else if a>=500, b=a*(1-5%) else a>=1000, b=a*(1-10%) } print b

@西凝4935:商品打折编程题 -
卜性15194353577…… if(原价<=100) 价格=原价*0.95else if(原价<1000) 价格=原价*0.9else 价格=原价*0.85大致就这样自己看看吧

@西凝4935:做VB程序设计,在超市买东西五百块以上的东西打八折,200到500之间打九折 200以下不打折 求高手速度回答, -
卜性15194353577…… a=val(inputbox("请输入款项")) if a>=500 then a=a*0.8 elseif a>=200 and a<500 then a=a*0.9 end if msgbox “需要支付" & a &“元”

@西凝4935:我有道java编程小题求编程:商场价格打折 无需界面
卜性15194353577…… 我写了个简单的仅供参考: public class Seal { private static double totalMoney; public double getTotalMoney() { return totalMoney; } @SuppressWarnings("static-access") public void setTotalMoney(double totalMoney) { this.totalMoney = ...

@西凝4935:请问用python怎样编写这个程序,其它编程语言也可以 -
卜性15194353577…… 给一个列表,里面全是整数.假设给定目标数字A,列表中将有两个整数的和为A,求这两个整数的索引值. 你可以假设每一个输入都只有一个解. 例子 给定列表nums = [2, 7, 11, 15], 目标数字 = 9, 因为 nums[0] + nums[1] = 2 + 7 = 9,所以 ...

相关推荐

  • 学python编程大概多少钱
  • python入门教程(非常详细)
  • 用python编程 商品打折
  • python在线编程网站
  • python商店打折代码
  • python简单有趣的小程序
  • python编程全套教程
  • 如何自己编程做游戏
  • python编程一个最简单游戏
  • python新手入门小程序
  • python输入金额查折扣
  • python初学编程必背
  • python小程序完整代码
  • python编程实例大全
  • python编程必背单词
  • 如何使用python编程
  • python购物小票设计程序
  • python抽奖简单小程序
  • python题库及答案入门简单
  • python计算打折价格的方程
  • python编译器手机版
  • python编程经典例题
  • python编程在线网站
  • 免费的python编程软件
  • python代码自动生成器
  • python编程教程下载
  • 本文由网友投稿,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
    若有什么问题请联系我们
    2024© 客安网