球体是生活中最常见的几何图形,乓乓球、篮球、足球都是球体。球体的表面积和体积计算公式如下:
编写程序,根据输入的球体半径,计算球体的表面积和体积是多少。
图 输出球体的表面积和体积
相关技能学习区
l input()函数——输入
https://zyk.mingrisoft.com/Develop/view/id/1186/type/6/cid/49.html?keyword=input
l format()函数
https://zyk.mingrisoft.com/Develop/view/id/1192/type/6/cid/49.html?keyword=format
l float()函数——整数和字符串转换为浮点数
https://zyk.mingrisoft.com/Develop/view/id/1348/type/6/cid/49.html?keyword=float
本节 任务:球体表面积和体积计算
本节目标:完善程序,进化编程功力(2级)
通过学习本节,你将提升的技能↓↓↓技能
提升
表技能1:input()函数的应用
技能2:format()函数的应用
技能3:float()函数的应用
进入“每天编程一小时”首页