Python 阶段编程练习(二十一)
编程练习
使用map函数,求元组 (2,4,6,8,10,12)中各个元素的5次方
任务
pow_five函数体内:计算元素的5次方
调用pow_five函数传入data,使用result接收
任务提示
pow(x,y) 方法返回 x的y次方的值
计算结果:(32, 1024, 7776, 32768, 100000, 248832)
初始代码
def pow_five(data):
# 计算元素的5次方
result =
return result
if ...
hn.icodeq.com1 min read