This website works better with JavaScript.
Home
Explore
帮助
返回水杉在线
登录水杉在线
登录水杉码园
Comp-Prog-A.Liuyao.2021Fall.XinYuan
/
AllStuWrite
Watch
61
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
删除 'sy5-1.py'
master
吴思辰
3 years ago
parent
31384fb921
commit
69c61236ff
1 changed files
with
0 additions
and
10 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-10
sy5-1.py
+ 0
- 10
sy5-1.py
View File
@ -1,10 +0,0 @@
#定义函数getCelsius,将华氏温度转化为摄氏温度
def
getCelsius
(
f
)
:
c
=
(
f
-
32
)
*
9
/
5
#计算摄氏温度
return
c
#返回摄氏温度
f
=
float
(
input
(
"
input fahr:
"
)
)
#输入华氏温度
c
=
getCelsius
(
f
)
#调用getCelsius求摄氏温度
print
(
"
fahr=
%.1f
, celsius =
%.1f
\n
"
%
(
f
,
c
)
)
;
#输出结果
Write
Preview
Loading…
Cancel
Save