- 博客(3)
- 收藏
- 关注
原创 第三章 数字函数、字符串和对象(缺最后几道)
import turtleimport mathimport time# 第3.2节# 3.1(几何学:五边形的面积)r = eval(input('Enter the length from the center to a vertex:'))s = 2 * r * math.sin(math.pi / 5)area = 5 * s * s / (4 * math.tan(math.pi / 5))print(f'The area of the pentagon is {area:.2
2020-07-20 13:04:50
212
原创 第一章1(1.11——1.21)
import turtle# 1.11birth_t = 7dead_t = 13migrant_t = 45people_num = 3120324986birth = 365 * 24 * 60 * 60 // birth_tdead = 365 * 24 * 60 * 60 // dead_tmigrant = 365 * 24 * 60 * 60 // migrant_tfor i in range(5): print('第{}年的人口为:{}'.format(i + 1
2020-05-23 12:29:19
283
原创 《Python语言程序设计》(梁勇著)习题
第一章 编程题0(1.3——1.10)import turtle, time, math# 绘制图形并给图形添加颜色# turtle.showturtle()# 在turtle中添加文本# turtle.write('Welcome to Python!')# turtle.forward(100)# turtle.right(90)# turtle.color('red')# turtle.forward(50)# turtle.right(90)# turtle.color('g
2020-05-23 12:27:24
2170
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅