Bug description:
Basic For loops don’t work (While loops are fine though)
Expected vs Current Behavior:
Print each element of sequence, but prints nothing
Steps to reproduce:
for i in range(0,5+1,1):
print(i)
for i in range(5,0-1,-1):
print(i)
Bug appears at this link: https://replit.com/@jegendron/All-In-Class-Code-L1-Python#main.py
Screenshot(s)/Screen Recording:
Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Replit Profile: https://replit.com/@jegendron
1 Like
The problem must be related to something else as the code should work.
Difficult to understand on your repl (apart that there is an error on the whole code before as the if will never be executed)
Did you try to put the code in a separate file and let it run with run or via shell with the command python filename.py?
this looks like a problem with the nix migration creating an invalid configuration. @coltonatreplit
- Click Files > ⋮ > Show hidden files
- In the
.replit
file, replace lines 27-29 with
[interpreter.command]
args = [
"stderred",
"--",
"prybar-python3",
"-q",
"--ps1",
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
"-i",
]
1 Like
Indeed.
Create another repl and move the code there only the code.
hi Umar, was this repl created from a template or was it migrated to nix?
nevermind, it’s a nix migration. the problem was a stale migration configuration. thanks for pointing it out!
1 Like