Questionnaire avec score (verbes irréguliers anglais)

Fermé
Avexo Messages postés 17 Date d'inscription dimanche 12 octobre 2014 Statut Membre Dernière intervention 7 juin 2016 - 24 nov. 2015 à 19:15
dubcek Messages postés 18752 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 3 octobre 2024 - 25 nov. 2015 à 11:40
Salut,

Avec un ami pour mieux connaitre le batch, nous avons décidé de créer un questionnaire sur les verbes irréguliers, nous avons déjà réalisé plusieurs programmes, seuls, mais récemlent nous avons décider d'ajouter un score.
Nous sommes tombés sur un code (sur ce site d'ailleurs), nous avons donc regardé comment cela avait été fait, finalement ça n'était pas très différent de notre dernier programme. Nous avons donc rajouté cette partie score, malheureusement le programme ne fonctionne pas, et nous n'arrivons pas vraiment à trouver ou ça coince, nous avons donc besoin de l'avis de quelqu'un d'autre, ou d'un pro pour nous aider.

Le problème est que lorsque l'on donne la bonne réponse, on est quand même redirigé vers la page "réponse fausse".

Voici le code :
@echo off
title IRREGULAR VERBS
color F0
set note=20





:question1
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past simple of "voir" (translation) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP1%"=="saw" (goto :rep_bon) else goto rep_fausse



:question2
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the translation of "go" (infinitive) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP2%"=="aller" (goto :rep_bon) else goto rep_fausse




:question3
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past participle of "knew" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP3%"=="known" (goto :rep_bon) else goto rep_fausse



:question4
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past simple of "driven" (past participle) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
echo.
if "%REP4%"=="drove" (goto :rep_bon) else goto rep_fausse



:question5
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past participe of "dug" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP5%"=="dug" (goto :rep_bon) else goto rep_fausse



:question6
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the infinitive of "avoir" (translation) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP6%"=="have" (goto :rep_bon) else goto rep_fausse



:question7
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the translation of "shoot" (infinitive, one in one word only) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP7%"=="tirer" (goto :rep_bon) else goto rep_fausse



:question8
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the infinitive of "s'agenouiller" (translation) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP8%"=="kneel" (goto :rep_bon) else goto rep_fausse



:question9
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past participe of "bore" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
echo.
if "%REP9%"=="bear" (goto :rep_bon) else goto rep_fausse



:question10
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past simple of "shine" (infinitive) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP10%"=="shone" (goto :rep_bon) else goto rep_fausse



:question11
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the infinitive of "given" (past participle) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP11%"=="give" (goto :rep_bon) else goto rep_fausse



:question12
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the translation of "held" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP12%"=="tenir" (goto :rep_bon) else goto rep_fausse



:question13
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past participle of "nager" (translation) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP13%"=="swum" (goto :rep_bon) else goto rep_fausse



:question14
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past tense of "write" (infinitive) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP14%"=="wrote" (goto :rep_bon) else goto rep_fausse

:question15
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the translation of "learnt" (past participle) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP15%"=="apprendre" (goto :rep_bon) else goto rep_fausse



:question16
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past simple of "etaler, s'infiltrer" (infinitive) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP16%"=="spread" (goto :rep_bon) else goto rep_fausse



:question17
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the infitive of "threw" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP17%"=="throw" (goto :rep_bon) else goto rep_fausse



:question18
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past simple of "told" (past participle) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP18%"=="told" (goto :rep_bon) else goto rep_fausse



:question19
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the translation of "ran" (past simple) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP19%"=="courir" (goto :rep_bon) else goto rep_fausse



:question20
cls
color F0
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo ºWhat is the past participle of "swear" (infinitive) ?º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo.
SET/P choix=Your answer :
if "%REP9%"=="sworn" (goto :rep_bon) else goto rep_fausse









:rep_bon
cls
color F2
echo Right answer !!!
echo.
pause

if "%REP1%"=="saw" (
set REP1=0
goto :question2
)


if "%REP2%"=="aller" (
set REP2=0
goto :question3
)


if "%REP3%"=="known" (
set REP3=0
goto :question4
)


if "%REP4%"=="drove" (
set REP4=0
goto :question5
)


if "%REP5%"=="dug" (
set REP5=0
goto :question6
)


if "%REP6%"=="have" (
set REP6=0
goto :question7
)


if "%REP7%"=="tirer" (
set REP7=0
goto :question8
)


if "%REP8%"=="kneel" (
set REP8=0
goto :question9
)


if "%REP9%"=="bear" (
set REP9=0
goto :question10
)


if "%REP10%"=="shone" (
set REP10=0
goto :question11
)


if "%REP11%"=="give" (
set REP11=0
goto :question12
)


if "%REP12%"=="tenir" (
set REP12=0
goto :question13
)


if "%REP13%"=="swum" (
set REP13=0
goto :question14
)


if "%REP14%"=="wrote" (
set REP14=0
goto :question15
)


if "%REP15%"=="apprendre" (
set REP15=0
goto :question16
)


if "%REP16%"=="spread" (
set REP16=0
goto :question17
)


if "%REP17%"=="throw" (
set REP17=0
goto :question18
)


if "%REP18%"=="told" (
set REP18=0
goto :question19
)


if "%REP19%"=="courir" (
set REP19=0
goto :question20
)


if "%REP20%"=="sworn" (
set REP20=0
goto :score
)









:rep_fausse
cls
color 0C
echo Wrong answer !!!
set /a note=%note%-1
pause
if not "%REP1%"=="0" goto question1
if not "%REP2%"=="0" goto question2
if not "%REP3%"=="0" goto question3
if not "%REP4%"=="0" goto question4
if not "%REP5%"=="0" goto question5
if not "%REP6%"=="0" goto question6
if not "%REP7%"=="0" goto question7
if not "%REP8%"=="0" goto question8
if not "%REP9%"=="0" goto question9
if not "%REP10%"=="0" goto question10
if not "%REP11%"=="0" goto question11
if not "%REP12%"=="0" goto question12
if not "%REP13%"=="0" goto question13
if not "%REP14%"=="0" goto question14
if not "%REP15%"=="0" goto question15
if not "%REP16%"=="0" goto question16
if not "%REP17%"=="0" goto question17
if not "%REP18%"=="0" goto question18
if not "%REP19%"=="0" goto question19
if not "%REP20%"=="0" goto question20


:score
cls
color 0E
echo Your score is %note%/20
pause






PS : ceci est mon premier topic sur ce forum, si jamais il y a quelque chose qui ne va pas, dites le moi !

Thomas !

1 réponse

dubcek Messages postés 18752 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 3 octobre 2024 5 619
Modifié par dubcek le 25/11/2015 à 12:14
hello
dans
SET/P choix=Your answer :

la réponse est sauvée dans choix, il faut donc tester
if "%choix%"=="saw" (goto :rep_bon) else goto rep_fausse

ou changer, pour le premier test
SET/P REP1=Your answer : 
0