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
A teacher wants to check the typing proficiency of five students. She gives all of them the same passage to type. Which student
Hitman42 [59]

The student who uses macros for long words. They are most likely to pass words very easily because they have a macro. While not only saving time, also making a stunning performance as macros usually auto correct as well.

5 0
2 years ago
What operating system do you use on your personal computer or mobile device
soldier1979 [14.2K]

The most popular Operating Systems are:

Android

IOS

Windows

5 0
3 years ago
windows 93 it is a website THE QUESTION IS WHAT IS THE FIRST THING THAT POPS UP WHEN YOU OPEN THE WEBSITE?
dybincka [34]

Answer:

A black screen with green text in the top left corner

Explanation:

8 0
3 years ago
Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
rosijanka [135]

Answer:

<u><em>(1) Spam, (2) Trash.</em></u>

Explanation:

"<u><em>Emails are unsolicited-" is another word for spam</em></u> lol. <u><em>And then "Others she doesn’t need." is, again, another word for trash</em></u>. I mean if you don't need it is trash then.

WELP I hope I helped you even tho this is late. Ahem, well. <u><em>Stay awesome!</em></u>

8 0
3 years ago
How do you pick the brainliest answer on brainly.com?
Svet_ta [14]
After two people answer, there is a button over each answer that lets you pick the brainliest
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that displays the following pattern: ..\.\* .\.\*** \.\***** ******* \.\***** .\.\*** ..\.\* That is, seven line
    8·1 answer
  • It is okay to use a dust rag when cleaning the inside of a computer.
    9·2 answers
  • What is the difference between operating systems and application software?
    7·1 answer
  • When you use a script to create all of the tables for a database, you must start with the tables that don't have _______________
    15·1 answer
  • Select one or more of the following: Which of these events will cause signal(s) to be generated by the kernel (the operating sys
    6·1 answer
  • Whenever you are designing a project for commercial use (making money) and need to use photographs with people in them you must
    15·1 answer
  • Best programming languages? So far I have only learned html.​
    8·1 answer
  • In addition to assuming that n is a power of 2, we made, for the sake of simplicity, another, more subtle, assumption in setting
    5·1 answer
  • Use the drop-down menu to complete the steps for using the Goal Seek feature.
    13·2 answers
  • Why is the central limit theorem so important to the study of sampling distributions?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!