摘要: 阅读全文
posted @ 2024-10-06 20:32 近我者赤 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-10-06 20:29 近我者赤 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.九九乘法表 print('\n'.join([' '.join(["%2s ×%2s = %2s"%(j,i,i*j) for j in range(1,i+1)]) for i in range(1,10)])) #等价于以下语句: for i in range(1,10): print("" 阅读全文
posted @ 2024-08-05 09:59 近我者赤 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 整个集合大概是按照难易程度排序,简单常见的在前面,比较少见的在最后。 1.1 拆项 >>> a, b, c = 1, 2, 3 >>> a, b, c (1, 2, 3) >>> a, b, c = [1, 2, 3] >>> a, b, c (1, 2, 3) >>> a, b, c = (2 * 阅读全文
posted @ 2024-08-05 09:00 近我者赤 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1.turtle绘制奥运五环图 import turtle as p def drawCircle(x,y,c='red'): p.pu()# 抬起画笔 p.goto(x,y) # 绘制圆的起始位置 p.pd()# 放下画笔 p.color(c)# 绘制c色圆环 p.circle(30,360) # 阅读全文
posted @ 2024-08-04 19:53 近我者赤 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 坐标系与坐标平面--效果: 代码: # -*- coding: utf-8 -*- from manim import * class ZBX_ZBPM(Scene): def construct(self): #坐标平面(网格) my_plane = NumberPlane( faded_line 阅读全文
posted @ 2024-07-26 09:24 近我者赤 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 文本测试--效果: 代码: #-*- coding: utf-8 -*- from manim import * class TransformExample(Scene): def construct(self): banner = ManimBanner() banner.shift(UP * 阅读全文
posted @ 2024-07-26 09:20 近我者赤 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 常用的一些操作 【注:随版本升级,有些操作和指令会有改动】 from manim import * 从 manim 中导入了需要用到的模块 class Hello_World(Scene) 创建一个继承自Scene的一个类; def construct(self) construct方法对于mani 阅读全文
posted @ 2024-07-26 08:51 近我者赤 阅读(788) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-07-16 22:13 近我者赤 阅读(12) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示