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
Which of the following is used to keep track of website content?
Alja [10]

Complete Question:

Which of the following is used to keep track of website content?

Group of answer choices.

A. Antivirus software.

B. File management system.

C. Disk management.

D. Control panel.

Answer:

B. File management system.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

When a website has been created, it is important and necessary to manage and monitor the content or resources contained in the web site so as to improve and enhance its performance. In order to achieve this, a file management software or system such as LogicalDoc, Goo-gle drive, DocuWare, Alfresco, etc.

Hence, a file management system which is typically a cloud-based service can be used to keep track of website content.

6 0
3 years ago
One of the greatest benefits of dual enrollment courses is that students can receive:
Vika [28.1K]
I think the answer to this is A
7 0
3 years ago
Read 2 more answers
Which recovery method allows users to back up their personal files to an external drive or network share without administrative
GarryVolchara [31]

Answer:

File history

Explanation:

File history recovery method  allows users to back up their personal files to an external drive or network share without administrative assistance. File History is a backup program that holds your personal files saved in the directories archives, desktop, favorites, and Contacts. It searches the file system regularly for changes, and copies modified files to a different location.

8 0
4 years ago
A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. For e
Ad libitum [116K]

i = 1

while i < 10001:

   total = 0

   x = 1

   while x < i:

       if i % x == 0:

           total += x

       x+=1

   if total == i:

       print(str(i)+" is a perfect number")

   i += 1

When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.

5 0
3 years ago
This is science they just dont have the subject buy anyways 
Anna007 [38]
The environment helps us with many many hings thing. The most obvious plants helps us breath and we help them grow because we have the exact opposite breathing pattern. Animals poop almost anywhere they want and farms use it as fertilizer. I hope this enough to help you. Good luck with your work!!<span />
8 0
3 years ago
Read 2 more answers
Other questions:
  • Assume the variable date has been set to a string value of the form mm/dd/yyyy, for example 09/08/2010. (Actual numbers would ap
    8·1 answer
  • Select the correct answer.
    7·2 answers
  • When powering up the computer, the initial program loading and start-up is performed by using a ______________ program that is b
    14·1 answer
  • a ____ consists of wires connecting the cpu and other parts of the computer. The _____ transfers data between CPU and memory uni
    6·1 answer
  • What refrigerant has been approved for new household refrigerators and freezers
    14·1 answer
  • Develop a Python program. Define a class in Python and use it to create an object and display its components. Define a Student c
    11·1 answer
  • 1)Write the command that moves the file data1 into the directory testdata:
    9·1 answer
  • I’ll mark brainlest
    14·2 answers
  • What is the standard unit used to measure mass?​
    9·1 answer
  • All banks follow the same guideline for determining if an applicant qualifies for a loan.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!