+ 1

range()

Here answer is 32? Why byte=1 for c in range (5) byte*=2 print (byte)

24th Jul 2018, 12:46 PM
tardigrade
tardigrade - avatar
1 Answer
+ 4
the for loop loops from 0 to 4 (5 times), and for each iteration, byte is multiplied by 2. So byte = 2 * 2 * 2 * 2 * 2 byte = 32
24th Jul 2018, 12:53 PM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar