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
The basic barometer can be used to measure the height of a building. If the barometric readings at the top and the bottom of a b
Levart [38]

Answer:

230.51 m

Explanation:

Pb = 695 mmHg

Pt = 675 mmHg

Pb - Pt = 20 mmHg

Calculate dP:

dP = p * g * H = (13600)*(9.81)*(20/1000) = 2668.320 Pa

Calculate Height of building as dP is same for any medium of liquid

dP = p*g*H = 2668.320

H = 2668.32 / (1.18 * 9.81) = 230.51 m

8 0
3 years ago
Consider laminar, fully developed flow in a channel of constant surface temperature Ts. For a given mass flow rate and channel l
Pachacha [2.7K]

Answer:

Please see attachment.

Explanation:

8 0
3 years ago
A pipeline (NPS = 14 in; schedule = 80) has a length of 200 m. Water (15℃) is flowing at 0.16 m3/s. What is the pipe head loss f
dangina [55]

Answer:

Head loss is 1.64

Explanation:

Given data:

Length (L) = 200 m

Discharge (Q) = 0.16 m3/s

According to table of nominal pipe size , for schedule 80 , NPS 14,  pipe has diameter (D)= 12.5 in or 31.8 cm 0.318 m

We know, head\ loss  = \frac{f L V^2}{( 2 g D)}

where, f = Darcy friction factor

V = flow velocity

g = acceleration due to gravity

We know, flow rate Q = A x V

solving for V

V = \frac{Q}{A}

    = \frac{0.16}{\frac{\pi}{4} (0.318)^2} = 2.015 m/s

obtained Darcy friction factor  

calculate Reynold number (Re) ,

Re = \frac{\rho V D}{\mu}

where,\rho = density of water

\mu = Dynamic viscosity of water at 15 degree  C = 0.001 Ns/m2

so reynold number is

Re = \frac{1000\times 2.015\times 0.318}{0.001}

            = 6.4 x 10^5

For Schedule 80 PVC pipes , roughness (e) is  0.0015 mm

Relative roughness (e/D) = 0.0015 / 318 = 0.00005

from Moody diagram, for Re = 640000 and e/D = 0.00005 , Darcy friction factor , f = 0.0126

Therefore head loss is

HL = \frac{0.0126 (200)(2.015)^2}{( 2 \times 9.81 \times 0.318)}

HL = 1.64 m

7 0
3 years ago
If angle A is a complement of angle B, angle B and angle C are vertical angles, and the supplement of C has a measure of 140°. F
Over [174]

Answer:

50°

Explanation:

Complementary angles add up to 90°.

Supplementary angles add up to 180°.

Vertical angles are equal.

A + B = 90°

B = C

C = 180° − 140°

C = 40°

B = 40°

A = 50°

7 0
3 years ago
what is the relationship between magnetism and electromagnetism and how does this effect voltage in a circuit?
RideAnS [48]

Answer:

A magnetic field of changing intensity perpendicular to a wire will induce a voltage along the length of that wire. The amount of voltage induced depends on the rate of change of the magnetic field flux and the number of turns of wire (if coiled) exposed to the change in flux.

Please mark Brainliest!

3 0
2 years ago
Other questions:
  • A production plant has a requirement for a counter that will count 4,000 items before recycling and starting over. How many D fl
    15·1 answer
  • You’ve experienced convection cooling if you’ve ever extended your hand out the window of a moving vehicle or into a flowing wat
    6·1 answer
  • Part of the basic procedures is the vehicle check. What does that mean?
    7·1 answer
  • a vehicle is in her repair with a complaint at for heating output during testing and diagnosing air is found to be trapped in th
    15·1 answer
  • You are considering purchasing a compact washing machine, and you have the following information: The Energy Guide claims an est
    8·1 answer
  • Assume a steel pipe of inner radius r1= 20 mm and outer radius r2= 25 mm, which is exposed to natural convection at h = 50 W/m2.
    12·1 answer
  • In a certain balanced three phase system each line current is a 5a and each line voltage is 220v . What is the approximate real
    15·1 answer
  • Sort the following alphabets using MergeSort and give required steps. [2 Marks]
    9·1 answer
  • Free brainlist because im new and i just want to but you have t friend me first
    13·1 answer
  • Which of the following describes all illustrations created by freehand?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!