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
Technician A says that crush zones on a vehicle are designed to collapse in a controlled manner. Technician B says that reinforc
Ierofanga [76]

Answer:

only A

Explanation:

3 0
3 years ago
Write a loop that sets each array element to the sum of itself and the next element, except for the last element which stays the
kotykmax [81]

Hi, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.

Answer:

#Python

array = [5,2,3,4,5,0,7,1,9,8,2,7]

for i in range(len(array)-1):

   array[i] = array[i]+array[i+1]

print(array)

Explanation:

First, we create an array, then a for loop that iterates from the beginning of the array to the penultimate value, this avoids changes in the last value of the array, we modify the array elements, except the last one, by adding the current element and the next element, finally, we print the result.

5 0
3 years ago
Read 2 more answers
T
solniwko [45]

Answer:

Common Uses: Boxwood is well-suited for carving and turning, and the tree's diminutive size restricts it to smaller projects. Some common uses for Boxwood include: carvings, chess pieces, musical instruments (flutes, recorders, woodwinds, etc.), rulers, handles, turned objects, and other small specialty items.If you want a small, compact, low-growing shrub to form a hedge that serves as an accent or border along your walkway, fence line or planting beds, dwarf boxwood varieties are the best pick. The "Dwarf English" boxwood (Buxus sempervirens “Suffruticosa”) creates a border hedge approximately 1 to 2 feet in height.

Explanation:

3 0
3 years ago
Cool water at 15°C is throttled from 5(atm) to 1(atm), as in a kitchen faucet. What is the temperature change of the water? What
Tresset [83]

Answer:

the lost work per kilogram of water for this everyday household happening = 0.413 kJ/kg

Explanation:

Given that:

Initial Temperature T_1 = 15°C

Initial Pressure P_1 = 5 atm

Final Pressure P_2 = 1 atm

Data obtain from steam tables of saturated water at  15°C are as follows:

Specific volume  v = 1.001 cm³/gm

The change in temperature = 2°C

Specific heat of water = 4.19 J/gm.K

volume expansivity β = 1.5 × 10⁻⁴ K⁻¹

The expression to determine the change in temperature can be given as :

\delta \ T = \frac{-V (1- \beta \ T}{C_p} * \delta \ P ( \frac{1}{9.87} \ \frac{J}{cm^3/atm})\delta \ T = \frac{-1.001 \frac{cm^3}{gm} (1- 1.5*10^{-4} \  K^{-1} )*2}{4.19 \ \frac{J}{gm.K}} *(5-1)atm ( \frac{1}{9.87} \ \frac{J}{cm^3/atm})

Δ T = 0.093 K

Now; we can calculate the lost work bt the formula:

W_{lost} = T_{surr} *S

where ;

T_{surr} is the temperature of the surrounding. = 20°C = (20+273.15)K =  293.15 K

From above the change in entropy is:

\delta \  S = C_p \  In (\frac{T+ \delta \ T }{T}) *  \beta V \delta P

\delta \  S = 4.19*  \  In (\frac{288.15+0.093 }{288.15}) -  1.5*10^{-4} * 1.001 (5-1)* (\frac{1}{9.87})

\delta \  S =1.408*10^{-3} \ J/gm.K

W_{lost} = T_{surr} *S

W_{lost} = 293.15* 1.408*10^{-3} \ J/gm.K

W_{lost} = 0.413 \  kJ/kg

Thus, the lost work per kilogram of water for this everyday household happening = 0.413 kJ/kg

6 0
4 years ago
A very large plate is placed equidistant between two vertical walls. The 10-mm spacing between the plate and each wall is filled
Vikentia [17]

Answer:

Force per unit plate area is 0.1344 N/m^{2}

Solution:

As per the question:

The spacing between each wall and the plate, d = 10 mm = 0.01 m

Absolute viscosity of the liquid, \mu =1.92\times 10^{- 3} Pa-s

Speed, v = 35 mm/s = 0.035 m/s

Now,

Suppose the drag force that exist between each wall and plate is F and F' respectively:

Net Drag Force = F' + F''

F = \tau A

where

\tau = shear stress

A = Cross - sectional Area

Therefore,

Net Drag Force, F = (\tau ' +\tau '')A

\frac{F}{A} = \tau ' +\tau ''

Also

F = \frac{\mu v}{d}

where

\mu = dynamic coefficient of viscosity

Pressure, P = \frac{F}{A}

Therefore,

\frac{F}{A} = \frac{\mu v}{d} + \frac{\mu v}{d} = 2\frac{\mu v}{d}

\frac{F}{A} = 2\frac{1.92\times 10^{- 3}\times 0.035}{0.010} = 0.01344 N/m^{2}

8 0
3 years ago
Other questions:
  • Identify the correct statements about Lesch-Nyhan syndrome. There is more than one correct statement.
    5·1 answer
  • To use Allowable Stress Design to calculate required dimensions using a specified factor of safety. A structural element that ca
    7·1 answer
  • A company, studying the relation between job satisfaction and length of service of employees, classified employees into three le
    14·1 answer
  • Slovee plz asap<br> pzllzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
    6·2 answers
  • What are some ways you can design a working future notebook that writes for you when you speak
    11·1 answer
  • Hello, so I have a watch and I don't know where the plugin for the charger is, or what brand it is. Please do help and please DO
    11·1 answer
  • Explain the differences between a two-stroke and a four-stroke engine
    8·1 answer
  • Simplify the expression below:<br><br> 313 + 12 =
    13·2 answers
  • Estimate the energy (head) loss a short length of a pipe conveying 300 litres of water per second and suddenly enlarging from a
    6·1 answer
  • Which of the following is a true when describing an air ratchet?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!