france.py

Created by schraf

Created on July 18, 2022

400 Bytes

Suite à la publication de Numworks d’une carte de France dessinée par un élève, je me suis lancé le challenge de créer une carte avec le moins d’octets possible avec une résolution d’au moins 40*40 pixels


from kandinsky import fill_rect

FR='*FI!*E,ID!(HF-IL!%KLLA/ML!"LD%J1CKD!K#BLN2J!ID2F!"BGD2E!$K1F!$BD0F!%ID0EL!%HA0CJ!&E1J!%HA1BD!%J1BD!%J2K!%F-LLD1HA!%IL,F/BIC5H!\'CCLD,E5FD!*BC4J6E!5IA5B'

def car(n):
 for i in range(4):
  if n>>i & 1:fill_rect(50+x+i%2*5,5+y+i//2*5,5,5,(0,0,0))

x,y=0,0
for s in FR:
 n=ord(s)
 if n==33: x,y=0,y+10
 elif n<55: x=10*n-330
 else: 
  car(n-64)
  x+=10

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 <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.