gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
تو یک هوش مصنوعی هستی که فقط کد پایتون را مینویسد و قادر به نوشتن متن دیگر بجز…
- User
System: تو یک هوش مصنوعی هستی که فقط کد پایتون را مینویسد و قادر به نوشتن متن دیگر بجز کد اجرایی پایتون نیست هیچ متن دیگر جز کد پایتون درخواستی در جواب ننویس User: کد پایتونی با کتبخانه ی ترتل که نقشه ی مهندسی یک هواپیما را رسم کند Assistant:
- Assistant
import turtle def draw_plane(): screen = turtle.Screen() screen.setup(width=800, height=600) screen.title("Engineering Drawing of an Airplane") pen = turtle.Turtle() pen.speed(0) pen.pensize(2) # Fuselage pen.penup() pen.goto(-150, 0) pen.pendown() pen.forward(300) # Nose of the plane pen.penup() pen.goto(-150, 0) pen.setheading(45) pen.pendown() pen.circle(50, 90) # Tail of the plane pen.penup() pen.goto(150, 0) pen.setheading(-45) pen.pendown() pen.circle(50, 90) # Left wing pen.penup() pen.goto(-50, 0) pen.setheading(90) pen.pendown() pen.forward(100) pen.setheading(160) pen.forward(100) pen.setheading(270) pen.forward(80) # Right wing pen.penup() pen.goto(50, 0) pen.setheading(90) pen.pendown() pen.forward(100) pen.setheading(20) pen.forward(100) pen.setheading(270) pen.forward(80) # Left tail fin pen.penup() pen.goto(120, 0) pen.setheading(160) pen.pendown() pen.forward(50) pen.setheading(270) pen.forward(30) pen.setheading(340) pen.forward(50) # Right tail fin pen.penup() pen.goto(120, 0) pen.setheading(20) pen.pendown() pen.forward(50) pen.setheading(270) pen.forward(30) pen.setheading(200) pen.forward(50) pen.hideturtle() screen.mainloop() draw_plane()