Write a program that prints all powers of 2 from 20 up to 220.
Output Segment
1
2
4
8
16
:
65536
131072
262144
524288
1048576
tmp = 1 for i in range(21): print(tmp) tmp *= 2
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment