π
<-
Chat plein-écran
[^]

Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Unread postby critor » 14 Jul 2020, 10:24

12653En ce jour de fête nationale,
NumWorks
met à profit les formidables possibilités
Python
de sa calculatrice pour t'animer ses bons vœux.

Et puis n'hésite pas à aller consulter la publication officielle,
NumWorks
te propose en effet de gagner un assortiment de formages
La Box Fromage
pour fêter l'occasion. ;)

Code: Select all
from kandinsky import *
from time import *

white=color(255,255,255)

def draw_iron():
  rects = [
  (37,24,2,197,(130,130,130)),
  (29,25,1,195,(115,115,115)),
  (39,24,1,197,(106,106,106)),
  (38,23,1,1,(115,115,115)),
  (37,22,1,1,(115,115,115)),
  (29,24,1,1,(115,115,115)),
  (30,23,1,1,(115,115,115)),
  (31,22,6,1,(115,115,115)),
  (33,23,4,198,(167,167,167)),
  (30,24,2,197,(167,167,167)),
  (37,23,1,1,(142,142,142)),
  (31,23,1,1,(142,142,142)),
  (32,23,1,198,(218,218,218)),
  ]
  for r in rects:
    fill_rect(*r)
def draw_flag():
  rects = [
  (40,49,84,125,(0,50,160)),
  (201,49,77,125,(200,25,10)),
  ]
  for r in rects:
      fill_rect(*r)

def erase():
  fill_rect(40,19,247,31,white)
  fill_rect(40,174,247,31,white)

def draw_flag1():
  rects = [
  (40,35,7,144,(0,49,156)),
  (47,34,7,144,(0,49,156)),
  (54,33,7,144,(0,49,156)),
  (61,32,7,144,(0,49,156)),
  (68,31,7,144,(0,49,156)),
  (75,30,7,144,(0,49,156)),
  (82,30,7,144,(0,49,156)),
  (89,30,7,144,(0,49,156)),
  (96,31,7,144,(0,49,156)),
  (103,31,7,144,(0,49,156)),
  (110,32,7,144,(0,49,156)),
  (117,33,7,144,(0,49,156)),
  (201,46,7,144,(198,24,8)),
  (208,47,7,144,(198,24,8)),
  (215,48,7,144,(198,24,8)),
  (222,48,7,144,(198,24,8)),
  (229,49,7,144,(198,24,8)),
  (236,49,7,144,(198,24,8)),
  (243,49,7,144,(198,24,8)),
  (250,48,7,144,(198,24,8)),
  (257,48,7,144,(198,24,8)),
  (264,47,7,144,(198,24,8)),
  (271,47,7,144,(198,24,8)),
  ]
  for r in rects:
      fill_rect(*r)

def draw_flag2():
  rects = [
  (117,33,7,144,(0,49,156)),
  (110,34,7,144,(0,49,156)),
  (103,35,7,144,(0,49,156)),
  (96,36,7,144,(0,49,156)),
  (89,37,7,144,(0,49,156)),
  (82,38,7,144,(0,49,156)),
  (75,40,7,144,(0,49,156)),
  (68,41,7,144,(0,49,156)),
  (61,42,7,144,(0,49,156)),
  (54,42,7,144,(0,49,156)),
  (47,42,7,144,(0,49,156)),
  (40,41,7,144,(0,49,156)),
  (201,36,7,144,(198,24,8)),
  (208,38,7,144,(198,24,8)),
  (215,40,7,144,(198,24,8)),
  (222,41,7,144,(198,24,8)),
  (229,43,7,144,(198,24,8)),
  (236,44,7,144,(198,24,8)),
  (243,45,7,144,(198,24,8)),
  (250,46,7,144,(198,24,8)),
  (257,48,7,144,(198,24,8)),
  (264,49,7,144,(198,24,8)),
  (271,49,7,144,(198,24,8)),
  ]
  for r in rects:
      fill_rect(*r)

def draw_flag3():
  rects = [
  (40,44,7,144,(0,49,156)),
  (47,45,7,144,(0,49,156)),
  (54,46,7,144,(0,49,156)),
  (61,47,7,144,(0,49,156)),
  (68,48,7,144,(0,49,156)),
  (75,49,7,144,(0,49,156)),
  (82,49,7,144,(0,49,156)),
  (89,49,7,144,(0,49,156)),
  (96,48,7,144,(0,49,156)),
  (103,48,7,144,(0,49,156)),
  (110,47,7,144,(0,49,156)),
  (117,46,7,144,(0,49,156)),
  (201,33,7,144,(198,24,8)),
  (208,32,7,144,(198,24,8)),
  (215,31,7,144,(198,24,8)),
  (222,31,7,144,(198,24,8)),
  (229,30,7,144,(198,24,8)),
  (236,30,7,144,(198,24,8)),
  (243,30,7,144,(198,24,8)),
  (250,31,7,144,(198,24,8)),
  (257,31,7,144,(198,24,8)),
  (264,32,7,144,(198,24,8)),
  (271,32,7,144,(198,24,8)),
  ]
  for r in rects:
    fill_rect(*r)

def draw_flag4() :
  rects = [
  (117,46,7,144,(0,49,156)),
  (110,45,7,144,(0,49,156)),
  (103,44,7,144,(0,49,156)),
  (96,43,7,144,(0,49,156)),
  (89,42,7,144,(0,49,156)),
  (82,41,7,144,(0,49,156)),
  (75,39,7,144,(0,49,156)),
  (68,38,7,144,(0,49,156)),
  (61,37,7,144,(0,49,156)),
  (54,37,7,144,(0,49,156)),
  (47,37,7,144,(0,49,156)),
  (40,38,7,144,(0,49,156)),
  (201,43,7,144,(198,24,8)),
  (208,41,7,144,(198,24,8)),
  (215,39,7,144,(198,24,8)),
  (222,38,7,144,(198,24,8)),
  (229,36,7,144,(198,24,8)),
  (236,35,7,144,(198,24,8)),
  (243,34,7,144,(198,24,8)),
  (250,33,7,144,(198,24,8)),
  (257,31,7,144,(198,24,8)),
  (264,30,7,144,(198,24,8)),
  (271,30,7,144,(198,24,8)),
  ]
  for r in rects:
    fill_rect(*r)
t=0.7
def draw():
  draw_flag1()
  sleep(t)
  erase()
  draw_flag2()
  sleep(t)
  erase()
  draw_flag3()
  sleep(t)
  erase()
  draw_flag4()
  sleep(t)
  erase()

draw_iron()
while (True):
  draw()


Installation
:
https://workshop.numworks.com/python/nu ... _nationale
Source
:
https://twitter.com/NumWorksFR/status/1 ... 5215123456
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 6.9%
 
Posts: 35672
Images: 9559
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti
GitHub: critor

Re: Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Unread postby cent20 » 14 Jul 2020, 11:09

TI nous propose t'il de gagner du pâté ? :D
Image
Enseignant de mathématiques et de spécialité NSI ( projets, tutos ...)
:favorite: NumWork, Python : démineur, snake, tétris
User avatar
cent20Généreux
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 29.4%
 
Posts: 394
Images: 30
Joined: 17 May 2012, 09:49
Location: Avignon
Gender: Male
Calculator(s):

Re: Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Unread postby critor » 17 Jul 2020, 22:14

Résultat du concours :
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 6.9%
 
Posts: 35672
Images: 9559
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti
GitHub: critor


Return to News NumWorks

Who is online

Users browsing this forum: No registered users and 5 guests

-
Search
-
Featured topics
L'OS 5.5 de la TI-83 Premium CE / 84 Plus CE supprime l'assembleur - la plupart des jeux et certains programme ne fonctionneront plus
Omega, le fork étendant les capacités de ta NumWorks, même en mode examen !
Découvre les nouvelles fonctionnalités en Python de l'OS 5.5 pour la 83PCE/84+C-T Python Edition
Comparaisons des meilleurs prix pour acheter sa calculatrice !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...

Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
439 utilisateurs:
>434 invités
>0 membre
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)