How to Make a Target with Python: Any Tips or Step-by-Step Guides?

16 Replies, 1948 Views

If you’re into gaming or interactive stuff, Pygame might be worth a shot. It’s not as straightforward as turtle, but you can create a target and even make it interactive (like clicking on it). Here’s a basic example:

```python
import pygame

pygame.init()
screen = pygame.display.set_mode((400, 400))
colors = [(255, 0, 0), (255, 255, 255)]

for i in range(5):
pygame.draw.circle(screen, colors[i % 2], (200, 200), 100 - i*20)

pygame.display.flip()
```

It’s a bit more code, but it’s fun to play around with!

Messages In This Thread



Users browsing this thread: 1 Guest(s)