Python Exercises



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.

Language: Python
No Files Attached  
Budget: 10 USD
Due: 1 second ago


Answer