plouf_plouf.py

Created by alexandre-merle

Created on May 25, 2023

1.69 KB

plouf-plouf.fr


from math import *
from kandinsky import *
from ion import *
from time import *
from random import *
keys=[
KEY_BACKSPACE,KEY_EXP,KEY_LN,KEY_LOG,KEY_IMAGINARY,
KEY_COMMA,KEY_POWER,KEY_SINE,KEY_COSINE,
KEY_TANGENT,KEY_PI,KEY_SQRT,KEY_SQUARE,
KEY_SEVEN,KEY_EIGHT,KEY_NINE,KEY_LEFTPARENTHESIS,
KEY_RIGHTPARENTHESIS,KEY_FOUR,KEY_FIVE,KEY_SIX,
KEY_MULTIPLICATION,KEY_DIVISION,KEY_ONE,
KEY_TWO,KEY_THREE,KEY_PLUS,KEY_MINUS
]
lettre=[
0,"a","b","c","d","e","f","g","h","i","j",
"k","l","m","n","o","p","q","r","s","t",
"u","v","w","x","y","z"
]
name=["","","","","","","","","","","","",
"","","","","","","","","","","","","","",
"","","","","","","","","","","","","",""]
nnn=0
nn=0
n=0
l=0
while keydown(KEY_OK):
  pass
fill_rect(0,0,320,230,(0,200,200))
draw_string("         ",10+100*nn,10+20*l,(0,0,255),(0,255,255))
while True:
  while not keydown(KEY_EXE):
    for i in range(1,26):
      if keydown(keys[0])and name[n]!="":
        name[n]=""
        draw_string("         ",10+100*nn,10+20*l,(0,0,255),(0,255,255))
        while keydown(keys[0]):
          pass
      if keydown(keys[i]):
        name[n]+=lettre[i]
        while keydown(keys[i]):
          pass
      if keydown(KEY_OK)and nn<3:
        n+=1
        nn+=1
        if nn==3:
          l+=1
          nn=0
        draw_string("         ",10+100*nn,10+20*l,(0,0,255),(0,255,255))
        while keydown(KEY_OK):
          pass
      draw_string(""+str(name[n]),10+100*nn,10+20*l,(0,0,255),(0,255,255))
      if keydown(KEY_EXE):
        nbr=randint(0,n)
        fill_rect(10,170,300,35,(0,255,255))
        draw_string(""+str(name[nbr])+" a ete tire(e) au sort!!",30,180,(0,0,255),(0,255,255))
        while keydown(KEY_EXE):
          pass

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.