While Loop in Python
September 11, 2020
n = 0
numbers = []
while n < 6:
print "At the top, n is %d" % n
numbers.append(n)
n = n + 1
print "Numbers now: ", numbers
print "At the bottom, n is %d" % n
print "The numbers: "
for num in numbers:
print num
Recent Entries
- Real-world Physics February 01, 2025
- ChatGPT o3-mini January 31, 2025
- Bois Talisman January 30, 2025