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
What is the essence of the Central park and it impact in New York?​
Mars2501 [29]
Central Park’s significance was its influence throughout nationwide park architecture. It’s also an iconic landmark of New York and attracts millions of people each year
3 0
3 years ago
In fuel oil piping systems, all exterior above-grade fill piping shall be __________ when tanks are abandoned or removed.
castortr0y [4]

Answer:

Removed

Hope this Helps!

6 0
3 years ago
Can you give me examples of reciprocating motion?
tensa zangetsu [6.8K]

Answer:

Other examples of reciprocating motion include piston pumps and compressors, roller pressure and tensioning systems, material testing devices, and insertion machines.

Explanation:

6 0
3 years ago
Help me pls with tools
irina1246 [14]

Answer:

How?

Explanation:

3 0
4 years ago
Read 2 more answers
Identify 3 distractions for young drivers and explain how you plan to minimize these distractions
Veseljchak [2.6K]

Answer:

Phone, Eating, People in the car

Explanation:

your phone should always be off while driving and put away. Eating much like texting takes your attention away from the road so you should wait till you're parked or home to eat. People thrashing around or talking very loudly can be a terrible distraction. Ask them nicely to quiet down so you can focus on the road.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between the Otto and Diesel engine?
    7·1 answer
  • If a barrel of oil weighs 1.5 kN, calculate the specific weight, density, and specific gravity of the oil. The barrel weighs 110
    7·1 answer
  • Show that J/kg and m^2/s^2 are the same.
    8·1 answer
  • A cylindrical specimen of a metal alloy 48.0 mm long and 9.72 mm in diameter is stressed in tension. A true stress of 368 MPa ca
    12·1 answer
  • Which of the following do pumps provide to a fluid power system?
    8·1 answer
  • Oxygen combines with nitrogen in the air to form NOx at about
    6·2 answers
  • The ampere draw of a 5000 watt electric heater used on 120 volts is
    12·1 answer
  • A wooden pallet carrying 540kg rests on a wooden floor. (a) a forklift driver decides to push it without lifting it.what force m
    10·1 answer
  • Nitrogen (N2) enters an insulated compressor operating at steady state at 1 bar, 378C with a mass flow rate of 1000 kg/h and exi
    8·1 answer
  • what is a home that has its own roof, foundation, and a wall that extends from the roof through the foundation
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!