# file: ChapterControlFunc/counting.py """ counts from 1 to n 123 123[1, 2, 3] """ def whileloop(i, j): # counts from i to j while ( i < j ): print(i, end="") i = i + 1 print() def count(i, j): # counts from i to j for k in range(i,j): print(k, end="") def main(): n = 4 whileloop(1,n) count(1,n) main()