Question: Python Programming Help R4.1 Write a while loop that prints a. All squares less than n. For example, if n is 100, print 0 14916
Python Programming Help
R4.1 Write a while loop that prints a. All squares less than n. For example, if n is 100, print 0 14916 25 3649 64 81. b. All positive numbers that are divisible by 10 and less than n. For example, if n is 100, print 10 20 30 40 50 60 70 80 90 c. All powers of two less than n. For example, if n is 100, print 1 2 48 16 32 64 R4.2 Write a loop that computes a. The sum of all even numbers between 2 and 100 (inclusive). b. The sum of all squares between 1 and 100 (inclusive). c. The sum of all odd numbers between a and b (inclusive). d. The sum of all odd digits of n. (For example, if n is 32677, the sum would be 3 +7+7=17.) R4.3 Provide trace tables for these loops. c. i 10 while i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
