cls t=0 freq=3 f$=" trois secondes" bon=0 niveau: Input "nombre de lettres ", niv affiche: if (niv=1) then gosub niv1 if (niv=2) then gosub niv2 if (niv=3) then gosub niv3 if (niv=4) then gosub niv4 if (niv=5) then gosub niv5 if(niv>5) then print "pas plus de 5 lettres !" goto niveau end if cls t=t+1 graphsize 100,50 color green rect 0,0,graphwidth,graphheight color black font "times", 20,100 text h,10,T$ pause freq color green rect 0,0,graphwidth,graphheight text 20,10,u$ input "Qu'avez vous vu ? ", rep$ if(rep$=T$) then bon=bon+1 end if if (bon>0) then freq=2 f$=" deux secondes" end if if (bon>1) then freq=1 f$=" une seconde" end if if (bon>5) then freq=0.5 f$=" cinq dixièmes de seconde" end if if (bon>10) then freq=0.2 f$=" deux dixièmes de seconde" end if if (bon>15) then freq=0.1 f$=" un dixième de seconde" end if if (t=20) then goto fin goto affiche niv1: nb = int(rand * 26)+97 l1$=chr(nb) T$=l1$ u$=" " h=40 return niv2: nb1 = int(rand * 26)+97 nb2 = int(rand * 26)+97 l1$=chr(nb1) l2$=chr(nb2) T$=l1$+l2$ u$=" " h=35 return niv3: nb1 = int(rand * 26)+97 nb2 = int(rand * 26)+97 nb3 = int(rand * 26)+97 l1$=chr(nb1) l2$=chr(nb2) l3$=chr(nb3) T$=l1$+l2$+l3$ u$=" " h=30 return niv4: nb1 = int(rand * 26)+97 nb2 = int(rand * 26)+97 nb3 = int(rand * 26)+97 nb4 = int(rand * 26)+97 l1$=chr(nb1) l2$=chr(nb2) l3$=chr(nb3) l4$=chr(nb4) T$=l1$+l2$+l3$+l4$ u$=" " h=25 return niv5: nb1 = int(rand * 26)+97 nb2 = int(rand * 26)+97 nb3 = int(rand * 26)+97 nb4 = int(rand * 26)+97 nb5 = int(rand * 26)+97 l1$=chr(nb1) l2$=chr(nb2) l3$=chr(nb3) l4$=chr(nb4) l5$=chr(nb5) T$=l1$+l2$+l3$+l4$+l5$ u$=" " h=20 return fin: cls print "Vous avez "+bon+" bonnes réponses" print "La dernière fréquence était : "+freq+ " soit "+f$