# Python班
## 3/1社課
---
## pygame
---
open [replit](https://replit.com)
sign up and $log$ in
---
~~the end~~ :+1:
---
click on create new project (find pygame)
---
and you will see
```python=
import pygame, sys
from pygame.locals import QUIT
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
```
---
here's the [pygame doc](https://www.youtube.com/watch?v=dQw4w9WgXcQ)[s](https://www.pygame.org/docs/)
click this $\uparrow$
---
~~the end~~
---
find this code $\downarrow$ and copy paste it to replit

---
now I (Boyi) will explain the code :exploding_head:
---
pygame flow chart

---
{"title":"Python班","contributors":"[{\"id\":\"8447d62f-b77b-4e5c-80cf-0392360451ef\",\"add\":1427,\"del\":510},{\"id\":\"e0c7dab8-be31-4e15-a8e7-22968131e3e1\",\"add\":102,\"del\":0}]"}