博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python 温度转换程序_Python程序将米转换为码
阅读量:2528 次
发布时间:2019-05-11

本文共 1358 字,大约阅读时间需要 4 分钟。

python 温度转换程序

There are many problems where we have to calculate the distance in yards at the end but initially, the measurements are given in meters. So for such type of problems, the solution is converting the initial parameters into yards and then performing operations on it and another option is to perform operations in meters and then convert the final answer from meters to yards.

存在许多问题,我们必须最后计算以码为单位的距离,但最初,测量单位是以米为单位。 因此,对于此类问题,解决方案是将初始参数转换为码,然后对其执行运算,另一种选择是在米中执行运算,然后将最终答案从转换为码

So, here in this article, we are going to write a Python code for converting the meters into yards.

因此,在本文的此处,我们将编写用于将仪表转换为yards的Python代码

Key: 1 meter = 1.094 yards

关键: 1米= 1.094码

Example:

例:

Input:    Meters: 245    Output:    Yards: 268.03000000000003

Python code to convert Meters to yards

Python代码将米转换为码

# Python program to convert Centimeter to Inches # taking inputnum = float(input("Enter the distance measured in centimeter : "))# converting from cms to inches""" 1 inch = 2.54 centimeters"""inc = num/2.54 # printing the resultprint("Distance in inch : ", inc)

Output

输出量

First run:Enter the distance measured in meters : 245Distance in yards :  268.03000000000003 Second run:Enter the distance measured in meters : 54Distance in yards :  59.07600000000001Third run:Enter the distance measured in meters : 100Distance in yards :  109.4

翻译自:

python 温度转换程序

转载地址:http://urxzd.baihongyu.com/

你可能感兴趣的文章
POJ 3740 Easy Finding (DLX模板)
查看>>
MySQL 处理重复数据
查看>>
关于typedef的用法总结(转)
查看>>
hibernate could not resolve property
查看>>
【strtok()】——分割字符串
查看>>
Linux下安装rabbitmq
查看>>
曹德旺
查看>>
【转】判断点在多边形内(matlab)
查看>>
java基础之集合:List Set Map的概述以及使用场景
查看>>
Python 线程 进程 协程
查看>>
骨牌覆盖问题
查看>>
iOS语言中的KVO机制
查看>>
excel第一次打开报错 向程序发送命令时出错 多种解决办法含终极解决方法
查看>>
响应式web设计之CSS3 Media Queries
查看>>
实验三
查看>>
机器码和字节码
查看>>
环形菜单的实现
查看>>
Python 函数参数 传引用还是传值
查看>>
【解决Chrome浏览器和IE浏览器上传附件兼容的问题 -- Chrome关闭flash后,uploadify插件不可用的解决办法】...
查看>>
34 帧动画
查看>>