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
Whats a hybrid wired network
LuckyWell [14K]
A hybrid network is any computer network that uses more than one type of connecting technology or topology. For example, a home network that uses both Wi-Fi and Ethernet cables to connect computers is a hybrid.
5 0
3 years ago
Joshua wants to be a lawyer. He found the following table on the Bureau of Labor Statistics’ website to find out about the emplo
mars1129 [50]

The answer to your question is,

C) The number of lawyers will increase, so it may be difficult to find a job.

-Mabel <3

3 0
3 years ago
Read 2 more answers
Apache web server is the most widely used network operating system used on web servers.
Zarrin [17]
The statement that Apache web server is the most widely used network operating system used on web servers is true. This server runs on <span>67% of all webservers in the world</span>
The Apache web server is a free and open-source cross-platform HTTP Server,<span> developed and maintained by </span>Apache Software Foundation.
7 0
2 years ago
Read 2 more answers
write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption
Artyom0805 [142]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int cookies;

   cin >> cookies;

   cout << "The calorie consumption is: " << cookies * 142 << endl;

   return 0;

}

Explanation:

First line: include basic library of C++(input and output).

using namespace std;

Says to compiler we are using std.

int main() Main function

int cookies, cookies variable, of int type

cin >> cookies

get the number of the cookies from user

cout Print the text and calories(one cookie have 142 calories)

Have a nice day ;)

4 0
2 years ago
The process of using the new
IRINA_888 [86]

Answer:

The process of using the new

information system and doing away

with the old system is known as

system <u>development</u>

7 0
2 years ago
Other questions:
  • Which shortcut brings up the Print screen?
    10·2 answers
  • Which of the following was one of the first internet search engines? A. archie B. google C. Yahoo D.ask
    7·1 answer
  • "This part of the computer fetches instructions, carries out the operations commanded by the instructions, and produces some out
    15·1 answer
  • A string with delimiters can be parsed into separate fields using the _____ class.
    8·1 answer
  • Identify a stressor in your life. Conduct an internet search to locate at least two reliable sources of information on effective
    6·1 answer
  • Debug the following program.
    5·1 answer
  • With _________, users will receive recommendations for items liked by similar users.
    9·1 answer
  • JUST NEED TO KNOW WHO ALL DOSE EDGINUITY
    12·2 answers
  • How can presentation software be used in a
    10·2 answers
  • Now that you have learned the basics of acquiring relevant information through research, it's time to put your skills to work.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!