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
Consider a Carnot refrigeration cycle executed in a closed system in the saturated liquid–vapor mixture region using 1.06 kg of
Alexxandr [17]

Answer:

P_m_i_n = 442KPA

Explanation:

We are given:

m = 1.06Kg

T_H = 1.2T_L

T = 22kj

Therefore we need to find coefficient performance or the cycle

COP_R = \frac {1}{(T_R/T_l) -1}

= \frac {1 }{1.2-1}

= 5

For the amount of heat absorbed:

Q_l = COP_R Wm

= 5 × 22 = 110KJ

For the amount of heat rejected:

Q_H = Q_L + W_m

= 110 + 22 = 132KJ

[tex[ q_H = \frac{Q_L}{m} [/tex];

= = \frac{132}{1.06}

= 124.5KJ

Using refrigerant table at hfg = 124.5KJ/Kg we have 69.5°c

Convert 69.5°c to K we have 342.5K

To find the minimum temperature:

T_L = \frac{T_H}{1.2};

T_L = \frac{342.5}{1.2}

= 285.4K

Convert to °C we have 12.4°C

From the refrigerant R -134a table at T_L = 12.4°c we have 442KPa

6 0
3 years ago
Four kilograms of carbon monoxide (CO) is contained in a rigid tank with a volume of 1 m3. The tank is fitted with a paddle whee
Juli2301 [7.4K]

Answer:

a) 1 m^3/Kg  

b) 504 kJ

c) 514 kJ

Explanation:

<u>Given  </u>

-The mass of C_o2 = 1 kg  

-The volume of the tank V_tank = 1 m^3  

-The added energy E = 14 W  

-The time of adding energy t = 10 s  

-The increase in specific internal energy Δu = +10 kJ/kg  

-The change in kinetic energy ΔKE = 0 and The change in potential energy  

ΔPE =0  

<u>Required  </u>

(a)Specific volume at the final state v_2

(b)The energy transferred by the work W in kJ.  

(c)The energy transferred by the heat transfer W in kJ and the direction of  

the heat transfer.  

Assumption  

-Quasi-equilibrium process.  

<u>Solution</u>  

(a) The volume and the mass doesn't change then, the specific volume is constant.

 v= V_tank/m ---> 1/1= 1 m^3/Kg  

(b) The added work is defined by.  

W =E * t --->  14 x 10 x 3600 x 10^-3 = 504 kJ  

(c) From the first law of thermodynamics.  

Q - W = m * Δu

Q = (m * Δu) + W--> (1 x 10) + 504 = 514 kJ

The heat have (+) sign the n it is added to the system.

7 0
3 years ago
A safety interlock module operates by monitoring the voltage from the
In-s [12.5K]

Answer: its an Ignition coil

8 0
3 years ago
Why is it that dislocations play an important role in controlling the mechanical properties of metallic materials, however, they
klio [65]

Answer:

dislocations play an important role in controlling as

Explanation:

As dislocations plays an important role in the ductility, elasticity and plurality of materials

  • The elastic and elastic deflections play a large role in their properties as the metallic materials, because the dislocation of a glass material does not play a major role in their properties.

5 0
3 years ago
D. projectile
Colt1911 [192]
Answer: parabola

Explanation:

•Parabolic Trajectory:

In conclusion, projectiles travel with a parabolic trajectory due to the fact that the downward force of gravity accelerates them downward from their otherwise straight-line, gravity-free trajectory.
5 0
3 years ago
Other questions:
  • When designing a car that runs on wind or Air car . can you tell me the details for the following points Compressed Air Engine:
    8·1 answer
  • Which of the following is likely to have the suffix "" after the domain name in its URL?
    7·2 answers
  • . Carly's Catering provides meals for parties and special events. In Chapter 2, you wrote an application that prompts the user f
    10·1 answer
  • What's a disadvantage of highest MERV-rated filters?
    10·2 answers
  • Your coworker was impressed with the efficiency you showed in the previous problem and would like to apply your methods to a pro
    5·1 answer
  • The map shows the distribution of dairy farms across the lower 48 of the United States. Each dot on the map represents approxima
    11·1 answer
  • Tech A says that coolant circulates through some intake manifolds to help warm them up. Tech B says that some intake manifolds u
    13·1 answer
  • The two major forces opposing the motion of a vehicle moving on a level road are the rolling resistance of the tires, Fr, and th
    7·1 answer
  • The pressure less than atmospheric pressure is known as:
    6·1 answer
  • Which of the following maintenance items helps to ensure the vehicles engine lasts as long as possible?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!