豆包MarsCode超神之路——Pentakill

261 阅读8分钟

“本文正在参加豆包MarsCode测评官征文活动”

豆包MarsCode主页:www.marscode.cn/home

那么接下来我们就来逐一看这五个内容如何来创造价值的。

环境安装

安装步骤为了方便大家我在前一阵子就进行了GIF图片处理,根据操作步骤来安装即可,安装是真的很简单,基本上是没有任何技术含量的。

1、AI综合问答问答——通过

AI问答这是一般代码提示工具品类产品不一定具备的,只针对代码进行回答,这里我单独测试过,是可以回答几乎任何问题的,能力是相对比较全面的。

这里是可以看到对其它问题是支持的。

2、全面支持——super

以下的两类工具几乎包含了所有我们常用的内容,并且如果不喜欢使用本地的项目,我们甚至可以直接使用MarsCode IDE在线的云端环境版本,这里根本就不需要安装,只要有网直接连接操作即可,超神的方便。

我们企业的项目也可以直接传到Git上导入进来,或者直接上传即可,很方便的。

这里对应的官网支持内容说明,这就很详细了,都罗列出来,基本上我们平时常看到的所有编码与超文本语言都是支持的。

3、简单易用——so easy

我们来提出一个问题:

帮我使用Python语言来绘制一个小猪佩奇,窗体的名字叫做小猪佩奇。

我们来看看代码。

import turtlefrom turtle import *turtle.title('小猪佩奇')def nose(x,y):    """画鼻子"""    pensize(5)    pencolor((255, 155, 192))    penup()    # 将海龟移动到指定的坐标    goto(x,y)    pendown()    # 设置海龟的方向(0-东、90-北、180-西、270-南)    setheading(-30)    begin_fill()    fillcolor(255, 192, 203)    a = 0.4    for i in range(120):        if 0 <= i < 30 or 60 <= i <90:            a = a + 0.08            # 向左转3left(3)            # 向前走            forward(a)        else:            a = a - 0.08            left(3)            forward(a)    end_fill()    penup()    setheading(90)    forward(25)    setheading(0)    forward(10)    pendown()    """设置画笔的颜色(红, 绿, 蓝)"""    pencolor(255, 155, 192)    setheading(10)    begin_fill()    circle(5)    color(160, 82, 45)    end_fill()    penup()    setheading(0)    forward(20)    pendown()    pencolor(255, 155, 192)    setheading(10)    begin_fill()    circle(5)    color(160, 82, 45)    end_fill()def head(x, y):    """画头"""    color((255, 155, 192), "pink")    penup()    goto(x,y)    setheading(0)    pendown()    begin_fill()    setheading(180)    circle(300, -30)    circle(100, -60)    circle(80, -100)    circle(150, -20)    circle(60, -95)    setheading(161)    circle(-300, 15)    penup()    goto(-100, 100)    pendown()    setheading(-30)    a = 0.4    for i in range(60):        if 0<= i < 30 or 60 <= i < 90:            a = a + 0.08            lt(3) #向左转3fd(a) #向前走a的步长        else:            a = a - 0.08            lt(3)            fd(a)    end_fill()def ears(x,y):    """画耳朵"""    color((255, 155, 192), "pink")    penup()    goto(x, y)    pendown()    begin_fill()    setheading(100)    circle(-50, 50)    circle(-10, 120)    circle(-50, 54)    end_fill()    penup()    setheading(90)    forward(-12)    setheading(0)    forward(30)    pendown()    begin_fill()    setheading(90)    circle(-50, 50)    circle(-10, 120)    circle(-50, 56)    end_fill()def eyes(x,y):    """画眼睛"""    color((255, 155, 192), "white")    penup()    setheading(90)    forward(-20)    setheading(0)    forward(-95)    pendown()    begin_fill()    circle(15)    end_fill()    color("black")    penup()    setheading(90)    forward(12)    setheading(0)    forward(-3)    pendown()    begin_fill()    circle(3)    end_fill()    color((255, 155, 192), "white")    penup()    seth(90)    forward(-25)    seth(0)    forward(40)    pendown()    begin_fill()    circle(15)    end_fill()    color("black")    penup()    setheading(90)    forward(12)    setheading(0)    forward(-3)    pendown()    begin_fill()    circle(3)    end_fill()def cheek(x,y):    """画脸颊"""    color((255, 155, 192))    penup()    goto(x,y)    pendown()    setheading(0)    begin_fill()    circle(30)    end_fill()def mouth(x,y):    """画嘴巴"""    color(239, 69, 19)    penup()    goto(x, y)    pendown()    setheading(-80)    circle(30, 40)    circle(40, 80)def body(x,y):    '''画身体'''    penup()    goto(x,y)    pencolor('red')    fillcolor(250,106,106)    pendown()    begin_fill()    setheading(-66)    circle(-450,17)    setheading(180)    forward(185)    setheading(85)    circle(-450,17)    end_fill()    '''右手'''    penup()    goto(110,-45)    pendown()    pensize(8)    pencolor(255, 192, 203)    setheading(30)    circle(-400,10)    penup()    goto(167,-5)    pendown()    setheading(-120)    forward(20)    left(100)    forward(20)    '''左手'''    penup()    goto(-25,-45)    pendown()    pencolor(255, 192, 203)    setheading(150)    circle(400,10)    penup()    goto(-78,-6)    pendown()    setheading(-60)    forward(20)    right(100)    forward(20)def feet1(x,y):    pensize(7)    pencolor(255, 192, 203)    penup()    goto(x,y)    setheading(-90)    pendown()    forward(10)    penup()    goto(x-12,y-10)    pendown()    pencolor(238,201,0)    fillcolor(238,230,132)    begin_fill()    setheading(0)    forward(24)    right(90)    forward(36)    right(90)    forward(40)    circle(-10,180)    forward(16)    left(90)    forward(12)    end_fill()def feet2(x,y):    pensize(7)    pencolor(255, 192, 203)    penup()    goto(x,y)    setheading(-90)    pendown()    forward(10)    penup()    goto(x-12,y-10)    pendown()    pencolor(238,201,0)    fillcolor(238,230,132)    begin_fill()    setheading(0)    forward(24)    right(90)    forward(36)    right(90)    forward(40)    circle(-10,180)    forward(16)    left(90)    forward(12)    end_fill()def tail(x,y):    pensize(8)    penup()    goto(x,y)    pendown()    pencolor(255, 192, 203)    setheading(-5)    circle(30,100)    circle(10,180)    circle(20,150)def backg(x):    penup()    goto(-420,x)    setheading(0)    fillcolor(50,205,50)    begin_fill()    forward(840)    right(90)    forward(300)    right(90)    forward(840)    right(90)    forward(300)    end_fill()    setheading(0)    fillcolor(0,191,255)    begin_fill()    forward(840)    left(90)    forward(600)    left(90)    forward(840)    left(90)    forward(600)    end_fill()def cloude1(x, y):    """画云"""    penup()    goto(x,y)    setheading(90)    fillcolor(255,255,255)    begin_fill()    a = 0.4    for i in range(120):        if 0 <= i < 30 or 60 <= i <90:            a = a + 0.14            # 向左转3left(3)            # 向前走            forward(a)        else:            a = a - 0.15            left(3)            forward(a)    end_fill()def cloude2(x, y):    """画云"""    penup()    goto(x,y)    setheading(90)    fillcolor(255,255,255)    begin_fill()    a = 0.4    for i in range(120):        if 0 <= i < 30 or 60 <= i <90:            a = a + 0.15            # 向左转3left(3)            # 向前走            forward(a)        else:            a = a - 0.13            left(3)            forward(a)    end_fill()def setting():    """设置参数"""    pensize(5)    # 隐藏海龟    hideturtle()    colormode(255)    color((255, 155, 192), "pink")    setup(840, 700)    speed(10)def main():    """主函数"""    setting()    backg(0)    body(105,-20)    nose(-100, 100)    head(-69, 167)    ears(0, 160)    eyes(0, 140)    cheek(80, 10)    mouth(-20, 30)    feet1(10,-150)    feet2(90,-150)    tail(130,-110)    cloude1(-200,200)    cloude2(300,300)    done()if __name__ == '__main__':    main()

绝杀能力——史上最强返回字符串长度。

就一句话就问出了个这样超级漂亮的小猪佩奇,你说神奇不神奇,我就很佩服了。

4、异常解决——满分通过

这里为了表现异常的解决能力,我们也先尝试一下提问:

python代码,5/0等于多少?

没有异常,我们就创建一个异常,现在我们就有这个异常了,接下来我们直接运行错误代码,并让它绝对看看。

可以看到,异常解决的是非常漂亮的呢。

当然,不仅仅是异常解决,这款工具支持的内容有很多,可以在下图中看到:

代码解释、代码补全、生成注释、错误修复都是可以的呢,相当的全面。

5、在线IDE——超神器

这是一款我认为的超级神器,毕竟很多时候需要协同开发,项目不是你一个人能搞定的,操作起来是真的很麻烦,在办公环境与自己的开发环境中来回的切换,真的是很烦人,有了它就能所有操作都相当于在一台电脑上了,省去了诸多的git同步操作。

各种同步操作是真的方便。

提供了非常详细的文档助手。

总结

全篇文章我们针对MarsCode的五个方面进行了测试,是真正的:【Pentakill 】。

当与遇到一款这样操作又简单、又实用的工具,你会心动吗?心动不如行动,快去下载一个吧。

官网地址:www.marscode.cn/home

“本文正在参加豆包MarsCode测评官征文活动”