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
An Administrator wants to have a thank you email sent after the form on the "Request a Demo" landing page is submitted. Where ca
sweet [91]

Answer:

Answer D is correct :

Explanation:

Configure an autoresponder email to send as a completion action when the \Request a Demo\ form has been submitted.

6 0
2 years ago
What does the machine do and how do the operators react to their work?
Stels [109]

Answer:

The answer is below

Explanation:

Machine functions or does the following:

1.  Transform energy

2.  Change force direction

3.  Increase or decrease speed

4.  Move force over a distance.

Machine operator reacts to their work in the following ways:

1.  Setting the machine for use

2.  Utilizing the machine effectively

3.  Performing machine maintenance

4.  Ensuring maximum optimization of the machine

6 0
3 years ago
Write a program that computes the monthly net pay of the employee for a steel factory. The input for this program is the hourly
Mars2501 [29]

Answer:

#include<stdio.h>

int main()

{

float rate_of_pay,regular_hours,overtime_hours,grosspay,netpay,tax;

printf("Enter the Hourly rate of pay : ");

scanf("%f",&rate_of_pay);

printf("Enter the number of Regular hours : ");

scanf("%f",&regular_hours);

printf("Enter the number of Overtime hours : ");

scanf("%f",&overtime_hours);

grosspay=(regular_hours*rate_of_pay)+(1.5*overtime_hours*rate_of_pay);

netpay=grosspay-(grosspay*0.2);

printf("Employee's Gross pay = %f\n",grosspay);

printf("Tax = %f\n",0.2*grosspay);

printf("Employee's Net pay = %f\n",netpay);

return 0;

}

Note: The variables are declared as float, to support partial hours like 0.5,6.5 etc.

Explanation:

6 0
3 years ago
Which approach does procedural programming follow? bottom up, top down, random, or object oriented​
ELEN [110]

Answer:

Top to down approach

Explanation:

7 0
2 years ago
An early attempt to force users to use less predictable passwords involved computer-supplied passwords. The passwords were eight
Sedaia [141]

Answer:

Recently, with the new and advanced hacking algorithms and affordable high-performance computers available to adversaries, the 36 character computer suggested passwords can easily be insecure.

Explanation:

The 8 length passwords generated pseudo-randomly by computers are not secure as there are new algorithms like the brute force algorithm that can dynamically obtain the passwords by looping through the password length and comparing all 36 characters to get the right one.

And also, the use of high-performance computers makes these algorithms effective

7 0
3 years ago
Other questions:
  • April 107 90 29 31 66 0.344
    8·1 answer
  • Slicing can best be described as
    9·1 answer
  • A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
    8·1 answer
  • The person in charge of recording the sound should always
    15·1 answer
  • How do i do a class in java??
    5·1 answer
  • George wants to pursue a career in web technology as a web developer. Which certifications can help him as a web developer?
    5·1 answer
  • Every single device can be connected to every other device on network, making the network mesh. This statement is True or False?
    8·1 answer
  • 15. Virus cannot infect files that are saved in i. USB ii. CD-ROMs iii. Memory card iv. All of them​
    14·2 answers
  • Compare and contrast the advantages and disadvantages of a LAN to a WLAN.
    8·1 answer
  • Hiiiiiiiiihwdawdfgthnythgrfergthyjuhgfd
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!