Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When testing multiple subjects, only runs the last one #229

Open
Gustrucco opened this issue Nov 5, 2021 · 1 comment
Open

When testing multiple subjects, only runs the last one #229

Gustrucco opened this issue Nov 5, 2021 · 1 comment

Comments

@Gustrucco
Copy link

For example, in this exercise, this solution passed the tests:

procedure DibujarLineaRoja3() 
{
  Mover(Norte)
  repeat(2)
  {
    Poner(Rojo)
    Mover(Este)
  }
  Poner(Rojo)
  VolverAtras()
}
@rgonzalezt
Copy link
Member

The solution that shows Gus passes but that's not correct because this is the solution that should pass:

procedure DibujarLineaRoja3(){
  repeat(2){
    Poner(Rojo)
    Mover(Este)
  }
  Poner(Rojo)
  VolverAtras()  
}

procedure DibujarLineaAzul3(){
  repeat(2){
    Poner(Azul)
    Mover(Este)
  }
  Poner(Azul)
  VolverAtras()  
}

In fact, this solution also pass and it's incorrect because of the Mover(Norte) of the last code line:

procedure DibujarLineaRoja3(){
  repeat(2){
    Poner(Rojo)
    Mover(Este)
  }
  Poner(Rojo)
  VolverAtras()  
}

procedure DibujarLineaAzul3(){
  repeat(2){
    Poner(Azul)
    Mover(Este)
  }
  Poner(Azul)
  VolverAtras()  
  Mover(Norte)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants