How can I input these sentence in console of python.
>>> b = 0
>>>while b < 0:
print b
b = b+1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-03-26
Python is senstive to spaces, so either use the tab key (bring the keyboard up if your device doesn't have a hardware keyboard) or space it out:
>>>b = 0
>>>while b < 0
… print b
… b = b+1
Of course, your example doesn't ever loop (since b < 0 is false) but if you said b = -2 before the while loop, you'd get some output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I input these sentence in console of python.
>>> b = 0
>>>while b < 0:
print b
b = b+1
Python is senstive to spaces, so either use the tab key (bring the keyboard up if your device doesn't have a hardware keyboard) or space it out:
>>>b = 0
>>>while b < 0
… print b
… b = b+1
Of course, your example doesn't ever loop (since b < 0 is false) but if you said b = -2 before the while loop, you'd get some output.