网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

使用Vpython作图(helloworld)

时间:2024-10-26 08:02:11

1、先在ubuntu下安装vpythonsudo apt-get install Python-visual

2、进入python导入模块from visual.text import *

3、输入代码:scene.title="HelloWorld"text(pos=(0,3,0),string='HELLOWORLD',color=color.orange,depth=-1,justify='center')text(pos=(0,0,0),string='HELLOWORLD',color=color.orange,depth=0,justify='center')text(pos=(0,-3,0),string='HELLOWORLD',color=color.orange,depth=1,justify='center')

使用Vpython作图(helloworld)

5、回车;可见下图

使用Vpython作图(helloworld)

6、初步完成Vpython demo

© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com