利用random库和math库自带函数(或lambda函数):实现随机生成一个1-10范围内的整数,并输出以该整数为半径的圆的面积。
import math import random r=random.randint(1,10) print(r,math.pi*(r**2))