Computers and Technology
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?

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, wwesuplexcity28
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
image
Computers and Technology, 23.06.2019 22:40, azariah7
22. sata3 allows for data transfer rates of 600 mb/s. explain why you would likely not be able to copy data from one hard drive to another at anywhere close to this speed. also, what could be upgraded on the computer to achieve transfer speeds closer to 600 mb/s
Answers: 1
image
Computers and Technology, 24.06.2019 17:30, KaleahV
List at least one thing to check for when you're checking the clarity and professionalism of a document.
Answers: 1
image
Computers and Technology, 25.06.2019 11:30, perezsamantha3oqr0za
If you have a document that is relevant to more than one folder on your computer, what should you do? a. save the document to the most appropriate folder. b. save the document in each folder. c. save the document in my documents rather than in one of the folders. d. save the document to libraries.
Answers: 2
Do you know the correct answer?
Given positive integer num_insects, write a while loop that prints that number doubled up to, but wi...

Questions in other subjects: