MajeedKazemi / code-struct

A new text-based environment that helps beginners transition into conventional text-based programming environments.
http://code-struct.vercel.app
GNU General Public License v3.0
26 stars 10 forks source link

Variables: For loop variables cannot use identical identifiers #535

Open vicchig opened 2 years ago

vicchig commented 2 years ago

Most of our variable logic makes decisions by looking at variables defined above the current line. So some possible causes of this issue are:

  1. Incorrect scoping for for loops
  2. Incorrect handling of for loop variables in this particular case
numbers = []
for count in range(1):

for count in range(2):
  numbers[count] //you are not allowed to insert count as an index specifier when accessing an element of a list
vicchig commented 2 years ago

Could not reproduce. Probably need to see video of the student who encountered this bug in order to see what they did exactly.

vicchig commented 2 years ago

Issue is something different from this. I followed the same steps as the student in the video and was still unable to reproduce. It is likely that they did something else that broke the editor before even attempting to write this code and that is why it stopped working.

I am going to move on to some more urgent issues, but will keep looking out for this.

MajeedKazemi commented 2 years ago

hmmm. ok, sounds good. Thanks for the update.

On Wed, Dec 22, 2021 at 11:31 AM Viktar Chyhir @.***> wrote:

Issue is something different from this. I followed the same steps as the student in the video and was still unable to reproduce. It is likely that they did something else that broke the editor before even attempting to write this code and that is why it stopped working.

I am going to move on to some more urgent issues, but will keep looking out for this.

— Reply to this email directly, view it on GitHub https://github.com/MajeedKazemi/nova-editor/issues/535#issuecomment-999708536, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANTKRUQPRSFYFFRHSMX32D3USH4L3ANCNFSM5JDE5ZDQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>