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
fgiga [73]
2 years ago
10

Write a program that responds to a positive integer passed on the command line with the number of bits needed to express that nu

mber in binary.
Computers and Technology
1 answer:
jolli1 [7]2 years ago
7 0
You may want to rephrase the output.

```
#!/usr/local/bin/python3

### Written for Python version 3! ###

import sys

num = int( sys.argv[ 1 ] )
exp = 0

while( num > 2**exp ):
    exp += 1

print( "It takes %d bits to get to the center of a Tootsie Roll" % exp )

exit( 0 )
```


You might be interested in
Assume the existence of a class named window with functions named close and freeresources, both of which accept no parameters an
denis-greek [22]
In your question whereas there is a class named window and it would be like this:

class window {
//code here 
}

Next is there is a function called close and freeresource and it goes like this:

class window{
  function close( ){
   //code here
  }
  function freeresource( ){
  // code here
  }
 public destruct (){
this.close();
this.freeresource();
}

}
The last code function destruct invokes the function close and freeresource. Hope this would help 

7 0
3 years ago
There are several reasons it’s important to use the right tool and the right size tool for the job, but the most important reaso
Helga [31]

Answer:

ok t dog

Explanation:

4 0
3 years ago
Truck drivers probably can't see your vehicle if ______________.
Arada [10]
<h2>Answer:</h2>

Truck drivers probably can't see your vehicle if you cannot see them in their side mirror

<h2>Explanation:</h2>

In driving terminology there is a term called the bind spot. Blind spot is the area where the driver is not able to see the vehicle behind him and this area is present just behind the truck and very close to the gates of the car. Since trucks do not have the rare mirror therefore if a car is present in their blind spot they wont be able to see it. The driver behind the truck can spot it if he does not see the truck driver in the side mirror of the truck.

5 0
3 years ago
Read 2 more answers
Jake is photographing his pet puppy. He wants to preview the image the camera will capture. What part of the camera that is insi
german

A. i think that is right

3 0
3 years ago
Read 2 more answers
Convert 1/32 GB into MB​
kiruha [24]

Answer:

31.25 megabytes.

31.25 megabytes

7 0
2 years ago
Other questions:
  • With a patent on drug Z27, why would Able Drug Company charge customers $7 per 100 units even though its cost of producing 100 u
    5·2 answers
  • Can I change my brainly username?
    9·2 answers
  • pWhat macOS system application tracks each block on a volume to determine which blocks are in use and which ones are available t
    14·1 answer
  • Why is outfitting a workspace with video games in technology development company considered a strategic use of money
    8·2 answers
  • _______ is a form of crime that targets a computer system to acquire information stored on that computer system, to control the
    12·1 answer
  • What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
    6·2 answers
  • 3. Which of the following is called address operator?<br> a)*<br> b) &amp;<br> c).<br> d) %
    12·1 answer
  • The administrators of Tiny College are so pleased with your design and implementation of their student registra- tion and tracki
    13·1 answer
  • What is the importance of knowing the concept of programming?
    8·1 answer
  • quizlet ann is a security professional for a midsize business and typically handles log analysis and security monitoring tasks f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!