Is that correct (computer science)?
Hey, so the program on the right is supposed to do the same thing as the one on the left. Ignore the text below; it's important to me whether this is correct. The task was: How can you write this with a while loop?
Without if condition, you can’t apply any else – the loop will automatically break if the singing is fulfilled. Or what did you want?
can you let the while stand like that and remove the else command or how? I don’t understand that a statement would be nice
No – just use whil. And there’s no repeat – if that’s not some other library…
Do it like this:
Thank you! but the repeat on the other program text is correct and written in the same program (WebTiger Jythom).
No, it doesn’t fit.
Your code is not even syntactically correct.
how should it be
You will have to replace the repeat (even if it is not clear what it does, that is not a part of Python). The if would have to be gone, including else, after that (so you can keep it, but you don’t need it anymore).