graphsize 600,600 cls clg color yellow rect 0,0,graphwidth,graphheight la = int(rand * 500)+50 ha = int(rand * 500)+50 lb = int(rand * 500)+50 hb = int(rand * 500)+50 lc = int(rand * 500)+50 hc = int(rand * 500)+50 ld = int(rand * 500)+50 hd = int(rand * 500)+50 le = int(rand * 500)+50 he = int(rand * 500)+50 lf = int(rand * 500)+50 hf = int(rand * 500)+50 l0=300 h0=300 color blue circle(l0,h0,270) color cyan circle(l0,h0,180) color red circle(l0,h0,100) color white font "Times New Roman",30,90 text 280,60,"1pt" text 270,140,"10pts" text 260,270,"100pts" color black circle(la,ha,20) circle(lb,hb,20) circle(lc,hc,20) circle(ld,hd,20) circle(le,he,20) circle(lf,hf,20) color white font "Times New Roman",30,50 text la-8,ha-25,"a" text lb-8,hb-25,"b" text lc-8,hc-25,"c" text ld-8,hd-25,"d" text le-8,he-25,"e" text lf-8,hf-25,"f" ca= int(sqr ((300-la)*(300-la) + (300-ha)*(300-ha))) ptca=0 if ca<290 then ptca=1 if ca<200 then ptca=10 if ca<120 then ptca=100 cb= int(sqr ((300-lb)*(300-lb) + (300-hb)*(300-hb))) ptcb=0 if cb<290 then ptcb=1 if cb<200 then ptcb=10 if cb<120 then ptcb=100 cc= int(sqr ((300-lc)*(300-lc) + (300-hc)*(300-hc))) ptcc=0 if cc<290 then ptcc=1 if cc<200 then ptcc=10 if cc<120 then ptcc=100 cd= int(sqr ((300-ld)*(300-ld) + (300-hd)*(300-hd))) ptcd=0 if cd<290 then ptcd=1 if cd<200 then ptcd=10 if cd<120 then ptcd=100 ce= int(sqr ((300-le)*(300-le) + (300-he)*(300-he))) ptce=0 if ce<290 then ptce=1 if ce<200 then ptce=10 if ce<120 then ptce=100 cf= int(sqr ((300-lf)*(300-lf) + (300-hf)*(300-hf))) ptcf=0 if cf<290 then ptcf=1 if cf<200 then ptcf=10 if cf<120 then ptcf=100 total=ptca+ptcb+ptcc+ptcd+ptce+ptcf Print "Combien de points avez-vous marqué ?" input rep nc=total\100 nbd=total\10 nd=nbd%10 nu=total%10 if rep=total then print "C'est bon !" else print "Erreur ! La bonne réponse : "+total end if print "Balle a : ("+ptca+") Balle b : ("+ptcb+") Balle c : ("+ptcc+") Balle d : ("+ptcd+") Balle e : ("+ptce+") Balle f : ("+ptcf+")" print ptca+" + "+ptcb+" + "+ptcc+" + "+ptcd+" + "+ptce+" + "+ptcf+" = "+total print"[ "+ nc+" impact"; if nc>1 then print "s"; print " à 100 pts ] + [ "; print nd+" impact"; if nd>1 then print "s"; print " à 10 pts ] + [ "; print nu+" impact"; if nu>1 then print "s"; print " à 1 pts ]" print "(100 x "+nc+") + (10 x "+nd+") + (1 x "+nu+") = "+total print"┌───┬───┬───┐" print"│ c │ d │ u │" print"├───┼───┼───┤" print"│ "+nc+" │ "+nd+" │ "+nu+" │" print"└───┴───┴───┘"