当前位置: 首页 > news >正文

北京电子商务网站制作旺道seo优化软件

北京电子商务网站制作,旺道seo优化软件,为博彩做网站日入两万,房地产新闻稿1.使用pycharm运行温度转换程序,尝试将温度单位设在前面 2.参照温度转换程序,自己写一个关于货币转换、长度转换、重量转换或者面积转换的程序 循环函数 def convertemperature():temperature ""while (temperature ! "q"):temperature in…

1.使用pycharm运行温度转换程序,尝试将温度单位设在前面

2.参照温度转换程序,自己写一个关于货币转换、长度转换、重量转换或者面积转换的程序

循环+函数

def convertemperature():temperature = ""while (temperature != "q"):temperature = input("请输入带有符号的温度:")if (temperature[-1] in ['f', 'F']):C = (eval(temperature[0:-1]) - 32) / 1.8print("转换后的温度是{:.2f}C".format(C))print("退出请输入q")elif (temperature[-1] in ['c', 'C']):C = (1.8 * eval(temperature[0:-1]) + 32)print("转换后的温度是{:.2f}C".format(C))else:print("输入格式错误")print("退出请输入q")convertemperature()
# 循环 +异常处理 温度单位设在前面 f代表华氏度 c代表摄氏度---函数里面循环 
def convertemperature():temperature = ""while (temperature != "exit"):temperature = input("请输入带有符号的温度:")if (temperature[0] in ['f', 'F']):try:C = (eval(temperature[1:]) - 32) / 1.8print("转换后的温度是{:.2f}C".format(C))except:print("转换失败,请重新输入")print("退出请输入exit")elif (temperature[0] in ['c', 'C']):try:C = (1.8 * eval(temperature[1:]) + 32)print("转换后的温度是{:.2f}C".format(C))except:print("转换失败,请重新输入")print("退出请输入exit")else:print("输入格式错误")print("退出请输入exit")# 循环 +异常处理 温度单位设在前面 f代表华氏度 c代表摄氏度
convertemperature()

循环里面使用函数

temperature=""
while (temperature != "q"):temperature = input("请输入带有符号的温度:")convertemperature2(temperature)def convertemperature2(aa):temperature = aaif (temperature[0] in ['f', 'F']):try:C = (eval(temperature[1:]) - 32) / 1.8print("转换后的温度是{:.2f}C".format(C))except:print("转换失败,请重新输入")print("退出请输入q")elif (temperature[0] in ['c', 'C']):try:C = (1.8 * eval(temperature[1:]) + 32)print("转换后的温度是{:.2f}C".format(C))except:print("转换失败,请重新输入")print("退出请输入q")else:print("输入格式错误")print("退出请输入q")

重量转换

# 货币转换、长度转换 、重量转换或者面积转换
temperature = ""
while temperature != "q":temperature = input("请输入带有符号的重量:")print(temperature[-2:])if temperature[-2:] in ['kg', "Kg", "KG", "kG"]:try:C = (eval(temperature[0:-2])  * 1000)print("转换后的重量是{:.2f}克".format(C))except:print("转换失败,请重新输入")print("退出请输入q")elif temperature[-1] in ['g', 'G']:try:C = (eval(temperature[0:-1]) / 1000)print("转换后的重量是{:.2f}千克".format(C))except:print("转换失败,请重新输入")print("退出请输入q")else:print("输入格式错误")print("退出请输入q")
# 循环 +异常处理  重量转换

http://www.ds6.com.cn/news/33859.html

相关文章:

  • 广州建立公司网站多少钱sem是什么意思的缩写
  • 微云做网站友链出售
  • 晋江网站建设价格软件测试培训机构哪家好
  • 制作公司主页周口seo推广
  • 做网站用什么技术好手游推广加盟
  • wordpress 写博客插件seo标题优化分析范文
  • 深圳建设局网站北京seo代理计费
  • 电商网站开发实战视频教程百度刷排名seo
  • 一家做土产网站常见的网络营销方法有哪些
  • 网站建设的职位seo技术助理
  • 淘宝客网站用什么软件做做网络推广一个月的收入
  • 做照明出口的网站有什么推广软件
  • 前端网站开发毕设类型百度seo关键词外包
  • 品牌网站建设4a小蝌蚪网络营销运营策划
  • 在建设局网站上怎么样总监解锁今日军事新闻最新消息
  • 肇庆自助网站建设系统app拉新推广平台
  • 如何查询网站的建设商网络推广怎样做
  • 做网站需要多钱广西seo公司
  • 做网站不推广管用吗竞价推广外包托管
  • vip视频网站怎么做2345网址导航官网下载
  • 济南品牌网站建设定制今日新闻播报
  • 江门做网站重庆seo服务
  • ui在线设计工具四川二级站seo整站优化排名
  • 兼职做网站安全么免费网站排名优化软件
  • 网站未备案什么意思免费创建个人网站
  • 网站导航如何用响应式做河南网络推广那家好
  • 广州seo运营网络优化的内容包括哪些
  • 微动漫怎么制作搜索引擎优化分析
  • 南昌网站建设设计优化设计电子版
  • 上海专业的网站新网站排名优化怎么做