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
What is the input for air cooler computer science​
Maru [420]

Answer:

cooling

Explanation:

Air cooling is a process of lowering air temperature by dissipating heat. It provides increased air flow and reduced temperatures with the use of cooling fins, fans or finned coils that move the heat out of a casing such as a computer …

5 0
2 years ago
In order to "print" the data in an object, the class should override the _____ method.
Olegator [25]

Answer:

toString is right Answer

Explanation:

If you want to represent any object as a string, toString() method comes into existence.  

The toString() method returns the string representation of the object.

If you print any object, java compiler internally invokes the toString() method on the object. So overriding the toString() method, returns the desired output, it can be the state of an object etc. depends on your implementation.

7 0
3 years ago
Why is continual user involvement a useful way to discover system requirements? Under what conditions might it be used? Under wh
True [87]

Answer:

continual user involvement gives the flexibility to analyze the requirements in right direction. because there is continuous meetings with the end user and he can provide right direction or avoids wrong interpretation of the requirement

Explanation:

continual user involvement is useful when we are following agile methodology where we are building complex systems. it is not useful for simple sytems and following waterfall methodology

7 0
3 years ago
What kind of table is a pasted Word table that can be edited with Word from within PowerPoint without changing the data in your
igomit [66]

D. Integrated

Or

A. Embedded

7 0
3 years ago
Read 2 more answers
The Copyright Act of 1976 statute extends protection to owners of _____________________, but this act by itself does not prevent
Debora [2.8K]

Answer:

The Copyright Act of 1976 statute extends protection to owners of the <u>artistic work.</u>

Explanation:

The Copyright Act of 1976 is a copyright law of the United States of America. This act came into effect on January 1, 1978. The copyright act states the basic rights of the copyright holders and extends protection to the original artistic works of authorship such as graphic work, literary work, musical work, graphic work, motion pictures etc.

3 0
3 years ago
Other questions:
  • Write a java program called allDigitsOdd that returns whether every digit of a positive integer is odd. Return true if the numbe
    6·1 answer
  • Liz will use a CD-R compact disk to write to more than once. Carlo will use a CD-RW compact disk to write to more than once. Who
    8·2 answers
  • What is TCP/IP's Transport layer's primary duty?
    8·1 answer
  • Write a program that allows the user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit t
    13·1 answer
  • Need this answered quickly, 40 PTS!
    15·2 answers
  • If you have machines doing jobs, fewer staff are needed, therefore costs are
    5·2 answers
  • How do I cancel a friend request?
    14·2 answers
  • Create a derived class called Car that inherits from Vehicle. The constructor should call the base class constructor, with 4 for
    13·1 answer
  • All who are interested in forex trading and bitcoin mining follow me for account management to all who are busy with work so i c
    14·1 answer
  • A 4"x6" photo is digitized using 10,000 pixels. An 11"x7" photo is digitized using 30,000 pixels. Which image will have the bett
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!