python汽车调用启动方法代码

Python029

python汽车调用启动方法代码,第1张

: test_start_makes_vehicle_run ▲点赞 7 # 需要导入模块: from vehicle import Vehicle [as 别名]# 或者: from vehicle.Vehicle i...

纯净天空

基于python的在线租车系统的研究目的和意义如下:

1、主要意义在于适应共享经济社会的时代发展,体现了共享给社会带来的便利性,经济性。实施可持续发展战略,建设资源节约型、环境友好型社会,增强公民环保意识,实施低碳排放,健康的生活方式。缓解日益严重的交通压力,方便人们出行。

2、目的在于智能化交通管制和规划。汽车租赁和共享出行本身是对交通压力的缓解,其压缩了车辆的使用量,有效合理的资源配置提高了个体车辆的使用效率。

你好,下面是一个对应的代码

import turtle

import time

t = turtle.Pen()

def fun1(t, x, y):

t.forward(x)

t.left(y)

def fun2(t, x, y):

t.forward(x)

t.right(y)

'''

color函数有三个参数

第一个参数指定有多少红色

第二个参数指定有多少绿色

第三个参数指定有多少蓝色

都为0的时候此时为黑色

都为1的时候此时为白色

这种红色,绿色,蓝色的混搭叫做RGB

蓝色和红色混合产生紫色

黄色和红色混合产生橙色

'''

t.color(1, 0, 0)

t.begin_fill()

fun1(t, 100, 90)

fun1(t, 20, 90)

fun2(t, 20, 90)

fun1(t, 20, 90)

fun1(t, 60, 90)

fun2(t, 20, 90)

fun1(t, 20, 90)

t.forward(20)

t.end_fill()

t.color(0, 0, 0)

t.up()

t.forward(10)

t.down()

# 开始位置

#t.begin_fill()

# 画圆

t.circle(10)

# 结束位置

#t.end_fill()

# 设置当前的指定角度为0度

t.setheading(0)

t.up()

t.forward(90)

t.right(90)

t.forward(10)

t.setheading(0)

t.down()

#t.begin_fill()

t.circle(10)

#t.end_fill()

t.up()

time.sleep(20)