z_episode2.py

Created by cent20

Created on July 09, 2024

409 Bytes

📙 Découvrir la NumWorks p.47
Joue avec ta #NumWorks : épisode 2

Générer un dégradé sur l'écran.

3 lignes de code peuvent suffire !
Dans l’idée il faut reproduire l’image sans lire ni exploiter le code ci-dessous. https://twitter.com/nsi_xyz/status/1642266291380670465


# [FR] Découvrir la NumWorks .p47 
# [EN]  Discovering the NumWorks p.47 
# Joue avec ta NumWorks : episode 2
# https://twitter.com/nsi_xyz/status/1642266291380670465
 
from kandinsky import fill_rect

for i in range(160):
    # On trace un dégradé avec 111 rectangles emboités
    # # We draw a gradient with 111 nested rectangles
    fill_rect(i, i, 320-2*i, 222-2*i, (42+i,42+i,42+i))

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.