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
castortr0y [4]
3 years ago
13

Write a function digits() that accepts a non-negative integer argument n and returns the number of digits in it’s decimal repres

entation. For credit, you should implement this using a loop and repeated integer division; you should not use math.log(), math.log10(), or conversion to string
Engineering
1 answer:
Katyanochek1 [597]3 years ago
3 0

Answer:

Explanation:

Let do this in python. We will utilize the while loop and keep on dividing by 10 until that number is less than 10. Along the loop we will count the number of looping process. Once the loop ends, we can output that as answer.

def digits(n):

    n_digit = 1

    while n >= 10:

         n_digit += 1

         n /= 10

    return n_digit

You might be interested in
An electric power plant uses solid waste for fuel in the production of electricity. The cost Y in dollars per hour to produce el
andrew-mc [135]

Answer:

15.64 MW

Explanation:

The computation of value of X that gives maximum profit is shown below:-

Profit = Revenue - Cost

= 15x - 0.2x 2 - 12 - 0.3x - 0.27x 2

= 14.7x - .47x^2 - 12

After solving the above equation we will get maximum differentiate  for profit that is

14.7 - 0.94x = 0

So,

x = 15.64 MW

Therefore for computing the value of X that gives maximum profit we simply solve the above equation.

8 0
3 years ago
A Geostationary satellite has an 8kW RF transmission pointed at the earth. How much force does that induce on the spacecraft? (N
soldier1979 [14.2K]

Answer:

The force induced on the aircraft is 2.60 N

Solution:

As per the question:

Power transmitted, P_{t} = 8 kW = 8000 W

Now, the force, F is given by:

P_{t} = Force(F)\times velocity(v) = Fv               (1)

where

v = velocity

Now,

For a geo-stationary satellite, the centripetal force, F_{c} is provided by the gravitational force, F_{G}:

F_{c} = F_{G}

\frac{mv^{2}}{R} = \frac{GM_{e}m{R^{2}}

Thus from the above, velocity comes out to be:

v = \sqrt{\frac{GM_{e}}{R}}

v = \sqrt{\frac{6.67\times 10^{- 11}\times 5.979\times 10^{24}}{42166\times 10^{3}}} = 3075.36 m/ s

where

R = R_{e} + H

R = \sqrt{GM_{e}(\frac{T}{2\pi})^{2}}

where

G = Gravitational constant

T = Time period of rotation of Earth

R is calculated as 42166 km

Now, from eqn (1):

8000 = F\times 3075.36

F = 2.60 N

6 0
3 years ago
alguien me ayuda con una tarea? Está en mi perfil de matemática, porfavorrr regalaré corona pero porfavor​
tensa zangetsu [6.8K]

Answer:

HUH?

Explanation:

5 0
3 years ago
Fill in the blank to correctly complete the statement below.
frutty [35]

Answer:

The invention of the pendulum-driven ___<u>clocks</u>___ in the 1600s paved the way for a new industrial era.

4 0
3 years ago
A group of n Ghostbusters is battling n ghosts. Each Ghostbuster carries a proton pack, which shoots a stream at a ghost, eradic
babunello [35]

Answer:

Using the above algorithm matches one pair of Ghostbuster and Ghost. On  each side of the line formed by the pairing, the number of Ghostbusters and Ghosts are  the same, so use the algorithm recursively on each side of the line to find pairings. The  worst case is when, after each iteration, one side of the line contains no Ghostbusters  or Ghosts. Then, we need n/2 total iterations to find pairings, giving us an P(n^{2} lg n)-  time algorithm.

4 0
3 years ago
Other questions:
  • Superheated steam is stored in a large tank at 6 MPa and 800°C, The steam is exhausted isentropically through a converging-diver
    5·1 answer
  • Define the difference between elastic and plastic deformation in terms of the effect on the crystal lattice structure.
    5·1 answer
  • Water (cp = 4180 J/kg·°C) enters the 2.5 cm internal diameter tube of a double-pipe counter-flow heat exchanger at 17°C at a rat
    7·1 answer
  • A hydraulic cylinder has a 125-mm diameter piston with hydraulic fluid inside the cylinder and an ambient pressure of 1 bar. Ass
    8·1 answer
  • A 860 kΩ resistor has 34 μA of current. What is the supply voltage for this electric circuit?
    13·2 answers
  • An airplane flies horizontally at 80 m/s. Its propeller delivers 1300 N of thrust (forward force) to overcome aerodynamic drag (
    15·1 answer
  • Who is using welding symbols to to communicate the detailed information necessary for welders to complete the weld?
    6·1 answer
  • Question 3
    14·1 answer
  • Consider the function f(n) = n
    14·1 answer
  • When starting up a dual fuel system, the temperature rise method for determining airflow cannot be used with the compressor cycl
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!