2 changed files with 33 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||||
|
b = 0 |
||||
|
def calc (a,b, c=1): |
||||
|
res = a+b+c |
||||
|
print(res) |
||||
|
return res |
||||
|
|
||||
|
calc(5,3,10) |
@ -0,0 +1,26 @@ |
|||||
|
import pygame |
||||
|
from pygame.locals import * |
||||
|
|
||||
|
pygame.init() |
||||
|
|
||||
|
#Création de la fenêtre: |
||||
|
size = [800, 600] |
||||
|
fenetre = pygame.display.set_mode((size), RESIZABLE) |
||||
|
|
||||
|
image = pygame.image.load("ton_image.png") |
||||
|
image.fill((255, 255, 255, 125), special_flags=BLEND_RGBA_MULT) |
||||
|
|
||||
|
continuer = True |
||||
|
clock = pygame.time.Clock() |
||||
|
|
||||
|
while continuer: |
||||
|
for event in pygame.event.get(): |
||||
|
if event.type == QUIT: |
||||
|
continuer = False |
||||
|
|
||||
|
clock.tick(30) |
||||
|
fenetre.fill(0) |
||||
|
fenetre.blit(image, (100, 100)) |
||||
|
pygame.display.flip() |
||||
|
|
||||
|
pygame.quit() |
Loading…
Reference in new issue