π
<-

Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Joyeux 14 Juillet 2020 illustré en Python sur NumWorks

Unread postby Admin » 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
 
Ce compte ne reçoit pas de MP / This account does not receive PMs.
User avatar
AdminAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 1%
 
Posts: 460
Images: 28
Joined: 30 Aug 2011, 11:00
Gender: Not specified
Calculator(s):
MyCalcs profile

Online

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 d'informatique. Spécialité NSI : Des projets, des tutos, mais aussi de l'art
Calculatrice NumWorks : Des applications et des jeux, scripts, 📙 Découvrir la NumWorks
User avatar
cent20VIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 48.3%
 
Posts: 1047
Images: 67
Joined: 17 May 2012, 09:49
Location: Avignon
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: nsi_xyz

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: 48%
 
Posts: 41980
Images: 15887
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor


Return to News NumWorks

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
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.
894 utilisateurs:
>871 invités
>16 membres
>7 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)