Similar Posts

Subscribe
Notify of
7 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
mat22
1 year ago

Without if condition, you can’t apply any else – the loop will automatically break if the singing is fulfilled. Or what did you want?

mat22
1 year ago
Reply to  Couchpotato352

No – just use whil. And there’s no repeat – if that’s not some other library…

Do it like this:

a = 1
zahl =50
while a*a < zahl:
 a+=1
print (a)

Destranix
1 year ago

No, it doesn’t fit.

Your code is not even syntactically correct.

Destranix
1 year ago
Reply to  Couchpotato352

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).