forked from hofmannol/AlgoDatSoSe25
Fixed problem with mrange
This commit is contained in:
parent
e14a11540c
commit
882310a859
@ -15,9 +15,14 @@ def mrange(parm1, parm2=None, parm3=None):
|
||||
stop = int(parm2)
|
||||
step = int(parm3)
|
||||
num = start
|
||||
if step > 0:
|
||||
while num < stop:
|
||||
yield Literal(num)
|
||||
num += step
|
||||
else:
|
||||
while num > stop:
|
||||
yield Literal(num)
|
||||
num += step
|
||||
|
||||
if __name__ == "__main__":
|
||||
for l in mrange(10):
|
||||
|
Loading…
x
Reference in New Issue
Block a user