Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

Can a while loop be used alone or while loop has to be succeeded by if and elif or else.. kindly solve this dilema?

OpenStudy (anonymous):

In a Python 'while' loop, the 'else' is optional. But that 'else' option does not also include an 'elif' option.

OpenStudy (anonymous):

Thank you applipye..!! :)

OpenStudy (anonymous):

The shell is a great place to experiment with how Python works. ``` >>> >>> x = 0 >>> while x < 10: print x, x += 1 0 1 2 3 4 5 6 7 8 9 >>> ```

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!