Fix: Lynda - Learning Microsoft Power Bi Desktop

Parce qu'il faut toujours un commencement...

Lynda - Learning Microsoft Power BI Desktop

PyGame Zero

0. Introduction


PyGame Zero est une bibliothèque de programmation de jeux vidéos basée sur PyGame avec pour objectif de simplifier encore plus l'accès à cet univers fascinant qu'est la programmation, notamment de jeux. PyGame Zero est aujourd'hui un bine meilleur outil d'apprentissage de la programmation orienté Kids que ne l'est Scratch. De plus l'usage de Python comme langage de développement permet d'ouvrir l'accès à un très vaste univers de développement passé, présent et à venir.

Documentation officielle : https://pygame-zero.readthedocs.io/en/stable

1. Installation


Python pour Windows
Pour les autres systèmes, si c'est Linux ou équivament, Python 3 est normalement déjà installé. Sinon rendez-vous sur https://www.python.org pour télécharger la version qui correspond à votre environnement.
PyGame Zero
Pour installer simplement PyGame Zero, depuis l'invite de commande, tapez pip install pgzero.

2. Principe


PyGame Zero est un wrapper autour de l'environnement PyGame. Son objectif est de simplifier la mise en place d'objets graphiques et leur interaction, ainsi que la prise en charge transparente de la logique applicative tournant autour du jeu : boucle d'événements, interaction entre les objets, gestion audio...

Un programme simple réalisé avec PyGame Zero qui permet d'afficher une fenêtre de 800 x 600 pixels avec un fond noir est équivalent à ceci Lynda - Learning Microsoft Power BI Desktop

WIDTH = 800
HEIGHT = 600

def draw():
   screen.fill((0,0,0))
Pour lancer le programme, il suffit, depuis une commande DOS, de faire pgzrun <nom du programme>. Vous pouvez remarquer que c'est d'une grande simplicité tout de même. Petite digression au passage. PyGame Zero essaie de reprendre les mêmes principes que le méta langage AMOS avait mis en place il y a déjà de fort longues années sur un des ordinateurs phares des années 1990 : le Commodore Amiga. Nous pouvons également le comparer au langage Processing qui permet également de réaliser des choses incroyables avec seulement quelques lignes de code.

Si l'on compare avec la même chose réalisée avec Pygame, nous obtiendrions quelque chose d'équivalent à ceci Then the next part: "the ability to analyze

import pygame

pygame.init()

size = 800, 600
screen = pygame.display.set_mode(size)

clock = pygame.time.Clock()
while True:
   for event in pygame.event.get():
      if event.type == pygame.KEYDOWN:
         if event.key == pygame.K_q:
            sys.exit()

   screen.fill(pygame.Color("black"))
   pygame.display.flip()
   clock.tick(60)

Fix: Lynda - Learning Microsoft Power Bi Desktop

Then the next part: "the ability to analyze and visualize data is crucial for making informed decisions." "the ability" could be "one's capacity|the skill|ability". "analyze" becomes "examine|assess|evaluate". "visualize" could be "present|illustrate|depict". "data" remains data (but in the example, "data-driven" was split, but "data" itself is not a proper noun, so perhaps replace with synonyms like "information|figures|metrics". However, in the user's example, "data" wasn't in the first text they provided. Wait, let me check again. The user provided their own example, maybe I should follow that.

The community part: "Join the community: Join Lynda’s community..." "Join" can be Enlist, but since "Join" is used twice, I can use the same set here. "Community" might be Forum or Online group—though "Community" is a proper noun if it refers to the specific Lynda's community, but in the original text, it's not a proper noun. Wait, no, in the text, it's "Lynda’s community," so "Lynda" is a proper noun, but "community" is a regular word. So I need to synonymize "community" as well. So maybe circle.

Each word not part of a proper noun is replaced with three synonyms.

So moving on. Next sentence: "In today’s data-driven business landscape, the ability to analyze and visualize data is crucial for making informed decisions." The word "In" could be replaced with "Within" or "In the". "today’s" becomes "today's|present-day|modern". Then "data-driven" could be "data-centric|information-centric|insight-based". "business landscape" might be "business environment|unique context|corporate ecosystem".