05 2020 档案

摘要:浮点数: a=3.14 a 3.14 type(a) #a的类型为浮点型:float <class 'float'> float(4) 4.0 314E-2 #科学计数法表示浮点数 3.14 b=2+8.3 #整数与浮点数混合使用,结果会自动转成浮点数 b 10.3 时间:计算机以1970年1月1日 阅读全文
posted @ 2020-05-29 09:51 技术人员小饭 阅读(164) 评论(0) 推荐(0)
摘要:符号 格式 说明 # #... 这是行注释 ''' '''... 这是块注释 \ ...\... 句断 + a+b 加号 - a-b 减号 * a*b 乘号 / a/b 可以得到的商为浮点数 // a//b 可以得到的商为整数 % a%b 可以得到a除以b的余数 += a+=b(a=a+b) 得到一 阅读全文
posted @ 2020-05-28 08:01 技术人员小饭 阅读(388) 评论(0) 推荐(0)
摘要:海龟绘图: import turtle # 海龟绘图 turtle.showturtle() # showturtle展示箭头 turtle.write('搞起') # write写入字符串 turtle.forward(300) # forword向前移动 turtle.color('red') 阅读全文
posted @ 2020-05-28 08:00 技术人员小饭 阅读(160) 评论(0) 推荐(0)
摘要:需要勾选Install for all users(为所有用户安装) Add Python to environment vanriables(添加Python到环境变量中) 万花筒代码 import turtle t=turtle.Pen() for x in range(36): t.forwa 阅读全文
posted @ 2020-05-26 17:14 技术人员小饭 阅读(263) 评论(0) 推荐(0)