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
JavaScript
Mekhanik [1.2K]

Answer:

C. 40

Explanation:

The code uses IF and ELSE statements to carry execute a block of code if any of the statements hold true

OrderTotal here is greater than 100, and this allows the second IF ELSE block to be executed.

The code to be executed is discountAmount = OrderTotal * 0.2

This will be discountAmount = 200 *0.2

therefore, discountAmount = 40.

3 0
3 years ago
What features are provided by most GUIs?
PSYCHO15rus [73]

Windows is the answer

8 0
3 years ago
which of these tools stick to the edge of an image, thus making it easy to select the shape of an image
USPshnik [31]

Answer:

ljb lih lug outbpiyougvotvoy

outiyfiyfiyfiyffiyvitfurcutfcutcrcutfutcdu

Explanation:

didn't understand the question

3 0
3 years ago
I can talk to you! How about we talk through the you know where people comment and say stuff about the question1
pychu [463]
Hmmm what do you want to talk about??
3 0
3 years ago
Read 2 more answers
If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
Paraphin [41]
You literally don’t do anything you’re just like dead of sun
4 0
3 years ago
Read 2 more answers
Other questions:
  • In your own words, explain the role of scientific investigation in the development of the Theory of Evolution.
    6·1 answer
  • Where can you check effective access on a shared folder? answer?
    11·1 answer
  • If johanna wants to label the x- and y-axes, she should click Layout, then
    8·1 answer
  • Read the scenario below and then answer the
    14·1 answer
  • Operating systems provide a measure of security by allowing users to access to those resources they've been cleared to use as we
    8·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    14·2 answers
  • What will be displayed if the following Java code segment is run? System.out.println("one "); System.out.print("two "); System.o
    12·1 answer
  • A wireless ________ extender is a network device that enhances transmission of your wireless signal.
    11·1 answer
  • Global communication and transportation technologies are an example of a(n) ____
    8·1 answer
  • c g given an array, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero eleme
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!