question archive Write a Python script, Lab02_03
Subject:Computer SciencePrice:2.85 Bought3
Write a Python script, Lab02_03.py that does the following: a. Uses a for loop to calculate and display the first 10 powers of 2. b. Uses a while loop to find the first power of 2 greater than 5000. Sample Run: 2 to the power 1 is 2 2 to the power 2 is 4 2 to the power 3 is 8 2 to the power 4 is 16 2 to the power 5 is 32 2 to the power 6 is 64 2 to the power 7 is 128 2 to the power 8 is 256 2 to the power 9 is 512 2 to the power 10 is 1024 First power of 2 > 5000 is 2 to the power 13 which is 8192
Purchased 3 times