学习心得
文章平均质量分 78
vilicoco - vina
这个作者很懒,什么都没留下…
展开
-
学习python的第五天
学习python的第五天作业的修正猜数字游戏计算机产生一个1-100的随机数,人输入自己猜的数字,计算机给出对应的提示"大一点"、“小一点"或"恭喜你猜对了”,直到猜中为止。如果猜的次数超过7次,计算机温馨提示"智商余额明显不足"。“”"import randomanswer = random.randrange(1, 101)counter = 0while True: counter += 1 user_answer = int(input('请输入你猜的数字原创 2021-07-24 11:51:39 · 1762 阅读 · 0 评论 -
学习python的第三天
学习python的第三天作业的改正1.知道圆的半径,求取圆的周长和面积import mathradius=float(input('请输入圆的半径:'))circleference=radius*2*math.picircle_area=radius**2*math.piprint(f'圆的周长为{circleference:.2f}')print(f'圆的面积为{circle_area:.2f}')2.公英制单位的转换x=float(input('请输入有几英寸:'))print(原创 2021-07-22 21:28:23 · 115 阅读 · 0 评论