ChatGPT created the ultimate Python camera race
table of contents
Hello,
Arubu Security Hole
System Solutions Department.
It's June. When can we celebrate holidays?
It's been raining a lot and I'm having trouble with my head, so I decided to hang out with ChatGPT (3.5) (who does a good job).
the Python camera race which I wrote about in an article a long time ago , even stronger. The ultimate title may be an exaggeration.
Operating environment and original code
- Windows11 Pro
- Python 3.11.1
- GPT-3.5
It will be long if you paste it, so please the code here.
1st time
For now, I told him to make it more fun.
▼Completed turtle race
Eh, it's the same as before...
The second time I regained my composure
Maybe I didn't convey it well, so I added "ultra aggressive"
Yeah, yeah, I feel like I'm going to be able to do it because I'm really in a good mood.
▼Complete
Hmm,
I've become a little more aggressive, but I still feel like I'm still a bit more aggressive.
3rd time
It's already too troublesome, so I'll ask you to make it chaotic.
It's starting to sound like an explanation of Disneyland, so I'm looking forward to it this time.
▼Complete
Oh, I feel like we're getting a little closer.
Is this the chaos ChatGPT thinks it is?
final challenge
I asked them to add more turtles and make them explode.
At this point, ChatGPT is also a success.
I'm grateful that you're willing to take advantage of my reckless behavior.
▼Completed code
from turtle import * from random import randint, choice import time # Prepare for an explosive extravaganza! bgcolor('black') colors = ['red', 'blue', 'orange', 'green', 'purple', 'yellow ', 'white'] shapes = ['turtle', 'classic', 'arrow', 'circle', 'square', 'triangle', 'turtle'] # Create a legion of turtles turtles = [] num_turtles = 100 # Increase or decrease this value for more or fewer turtles for _ in range(num_turtles): turtle = Turtle() turtle.color(choice(colors)) turtle.shape(choice(shapes)) turtle.penup() turtle.goto (randint(-300, 300), randint(-300, 300)) turtle.speed(randint(5, 15)) turtles.append(turtle) # Ignite the explosion! time.sleep(2) def explode(turtle) : turtle.shapesize(3) turtle.color('red') turtle.speed(10) for _ in range(36): turtle.right(10) turtle.stamp() # Let the explosion begin! for race in range (100): for turtle in turtles: turtle.forward(randint(5, 20)) if turtle.distance(0, 0) < 100: explode(turtle)
Additionally, please change the number of turtles! I wrote that, so I'll make it 100.
And this is what was completed ⇩
It's no longer a race
I feel like I have a terrible feeling that I can't express in words.
It feels like the possibilities are endless.
See you soon!
~Complete~