Python Exercises

Order Description

Write a while loop that prints:

  1. All squares less than n. For Example,if n is 100, print 0 1 4 9 16 25 36 64 81.
  2. All Positive integers that are divisible by 10 and are less than n. For example, if n is 100 print 10 20 30 40 50 60 70 80 90
  3. All powers of two less than n.For example if n is less than 100, print 1 2 4 8 16 32 64

 Write 3 separate programs.