PremierLangage / Yggdrasil

A PL subproject where we are tackling the design of new types of exercises
4 stars 2 forks source link

Liste des multiples #85

Closed ebrunach closed 4 years ago

ebrunach commented 4 years ago

La solution suivante ne fonctionne pas.

if n>0:
  for i in range(n):
    print(17*i,end="")

Le message d'erreur est le suivant (test 2 OK et 1 et 2 failure): Attendu:

017

Obtenu:

017

Attendu: Expected:

Got nothing

Obtenu:

Attendu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853

Obtenu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853
nimdanor commented 4 years ago

Il doit manquer un passage a la ligne.

Le jeu. 10 oct. 2019 à 09:00, ebrunach notifications@github.com a écrit :

La solution suivante ne fonctionne pas.

if n>0: for i in range(n): print(17*i,end="")

Le message d'erreur est le suivant (test 2 OK et 1 et 2 failure): Attendu:

017

Obtenu:

017

Attendu: Expected:

Got nothing

Obtenu:

Attendu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853

Obtenu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PremierLangage/Yggdrasil/issues/85?email_source=notifications&email_token=ACM6BRPX4UJCTNETVYUK4YLQN3HG7A5CNFSM4I7IWMJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQ23OEQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACM6BROTNYW6VOCQB2PCBWLQN3HG7ANCNFSM4I7IWMJA .

ebrunach commented 4 years ago

Dans la réponse ou dans la vérification ? Je veux bien modifier la source pour éviter ce genre de faux négatif mais je ne la source de cet exercice.

Le jeu. 10 oct. 2019 à 13:05, Dominique Revuz notifications@github.com a écrit :

Il doit manquer un passage a la ligne.

Le jeu. 10 oct. 2019 à 09:00, ebrunach notifications@github.com a écrit :

La solution suivante ne fonctionne pas.

if n>0: for i in range(n): print(17*i,end="")

Le message d'erreur est le suivant (test 2 OK et 1 et 2 failure): Attendu:

017

Obtenu:

017

Attendu: Expected:

Got nothing

Obtenu:

Attendu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853

Obtenu:

01734516885102119136153170187204221238255272289306323340357374391408425442459476493510527544561578595612629646663680697714731748765782799816833850867884901918935952969986100310201037105410711088110511221139115611731190120712241241125812751292130913261343136013771394141114281445146214791496151315301547156415811598161516321649166616831700171717341751176817851802181918361853

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/PremierLangage/Yggdrasil/issues/85?email_source=notifications&email_token=ACM6BRPX4UJCTNETVYUK4YLQN3HG7A5CNFSM4I7IWMJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQ23OEQ , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACM6BROTNYW6VOCQB2PCBWLQN3HG7ANCNFSM4I7IWMJA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PremierLangage/Yggdrasil/issues/85?email_source=notifications&email_token=AEFQQSWG7BZRMY5TFRKC44LQN4D7BA5CNFSM4I7IWMJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA32VYQ#issuecomment-540519138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFQQSX3EU4VG2ZEGDP3NIDQN4D7BANCNFSM4I7IWMJA .

nimdanor commented 4 years ago

n=int(input()) if n>=0: for i in range(n): print(17*i,end="") print()

ou bien n=int(input()) if not n<0: s="" for i in range(n): s+=str(i*17) print(s)