subject
Computers and Technology, 04.01.2021 20:20 jmcd10

Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow each number with a space. Sample output with input: 8
8 16 32 64
Here's what I havenum_insects = 8 # Must be >= 1print(num_insects, '', end='')while num_insects <= 100 : num_insects = num_insects * 2 print(num_insects,'', end="")This code prints the number 128 even thought the loop is set to end after 100? Why is that?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
Telling a computer that is already on to turn again is known as what type of boot?
Answers: 1
You know the right answer?
Given positive integer num_insects, write a while loop that prints that number doubled up to, but wi...
Questions
question
Health, 31.07.2020 07:01
question
Mathematics, 31.07.2020 07:01
Questions on the website: 13722361