1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ss7ja [257]
3 years ago
15

Print out the value and double it (multiply by 2). Continue printing and doubling (all on the same line, separated by one space

each) as long as the current number is less than 1000, or until 8 numbers have been printed on the line.
Computers and Technology
1 answer:
fiasKO [112]3 years ago
7 0

Answer:

value=int(input("Enter the value from where the user wants to starts: "))#Take the value from the user.

i=1#intialize the value of a variable by 1.

while(value<1000) and (i<9):#while loop which prints the value.

   print(value,end=" ")# print the value.

   value=value*2#calculate the value to print.

   i=i+1#calculate the value for the count.

Output:

If the user enter 5, then the output is : "5 10 20 40 80 160 320 640".

If the user enter 5, then the output is : "3 6 12 24 48 96 192 384".

Explanation:

  • The above code is in python language, in which the first line of the program is used to render a message to the user, take the input from the user and store it into value variable after converting it into an integer.
  • Then the loop will calculate the double value and then it prints the value with the help of print function.
  • The end function puts the spaces between numbers.
You might be interested in
What is an compiler?
marissa [1.9K]
The accurate answer is

A compiler takes your source code, it converts the entire thing into machine language and then stores these equivalent machine language instructions in a separate file. We programmers call that the "executable file.

Glad to help :)<span />
6 0
3 years ago
Read 2 more answers
How technology bacome the mode of revealing​
maria [59]

Answer:

afefdasf

Explanation:

3 0
3 years ago
A unit of measurement that describe the rate that electricity flows through a wire is an
Savatey [412]
AMPERE - a unit of measure for the flow of the current in a circut
8 0
3 years ago
How does Technology impact any profession or occupation?
Brrunno [24]

Technology can create or dimish occupations.

Technology can also make the job easier

8 0
3 years ago
Which of the following SNSs has been associated with art work display?
amid [387]
Hoi!

I would say DeviantArt, since that is the world's largest social website dedicated to displaying artwork.
7 0
3 years ago
Read 2 more answers
Other questions:
  • It creates an SQL statement to find the project that has the most employees from the same department. If more than one project m
    11·1 answer
  • How could you fact check a news report that you saw on television
    12·1 answer
  • Univariate linear regression Note: Solutions to this problem must follow the method described in class and the linear regression
    7·1 answer
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • Which type of market are you in if your firm, along with three other firms, controls 95% of the total music industry?
    13·1 answer
  • Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other clas
    10·2 answers
  • Tara is creating a presentation for her science project about volcanoes. She added different animations to every slide for empha
    12·1 answer
  • D is the correct answer
    8·2 answers
  • Help me guys plssssss​
    10·1 answer
  • You use a Windows desktop system to edit and produce audio files. Your system has two hard disks installed. Your applications ar
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!