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]
3 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]3 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
What is the largest computer file size, megabyte , gigabyte, terabyte
STatiana [176]

The terabyte is the largest computer file size because it has 1024 gigabytes each of which has 1024 megabytes. Therefore, the the terabyte can be subdivided into megabytes or gigabytes.

3 0
3 years ago
Read 2 more answers
16. (PPT) You can use features on the Video Tools Playback tab to adjust how and when the video plays during the slide
Nezavi [6.7K]

Answer:

a. True

Explanation:

5 0
2 years ago
Which of the following helps create a positive community?
Lera25 [3.4K]

Answer: D.) all of the above

Explanation: By doing all three of these it makes almost everyone in the community is happier and more positive which is better than the bully's & people who don't speak up feel less entitled, it achieves the goal.

5 0
3 years ago
Which of the following is a strength of fiscal policy?
Fynjy0 [20]
The answer to your question is b crowding out effect
7 0
3 years ago
Several users on the second floor of your company's building are reporting that the network is down. You go to the second floor
Juliette [100K]

The troubleshooting step that you should take next is to Question User.

<h3>What is Troubleshooting?</h3>

This refers to the diagnostics that is run on a computer program or system in order to find the problem that is causing it to malfunction or misbehave.

Hence, we can see that based on the fact that several users on the second floor of your company's building are reporting that the network is down and go to the second floor to investigate and find that you are able to access the network, the troubleshooting step that you should take next is to Question User.

Read more about troubleshooting here:

brainly.com/question/13818690

#SPJ1

3 0
2 years ago
Other questions:
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
    8·1 answer
  • Int, char, bool, and double are all valid data types in c , true or false
    15·1 answer
  • Smartphones can have virtual keyboards or physical keyboards. What are 3 advantages and disadvantages to each one?
    13·1 answer
  • You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
    11·1 answer
  • Translate each of these statements into logical expressions using predicates, quantifiers, and logical connectives. a) Something
    7·1 answer
  • Declare a Scanner reference variable fileInput, and assign it a newly created Scanner object that is associated with a file name
    10·1 answer
  • 2. What does the "Users" metric measure?
    10·1 answer
  • What type of data would a RDBMS store in a linked list, two-way linked list, or B-trees? What are the advantages and disadvantag
    5·1 answer
  • A professional photographer working for a top newspaper would like control over the quality and editing
    14·2 answers
  • Write a qbasic program to display integer numbers 1 to 100 using the for next loop<br>​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!