Answer:
Step-by-step explanation:
We can get this done by using the code
def digits(n):
count = 0
if n == 0:
return 1
while (n > 0):
count += 1
n= n//10
return count
Also, another way of putting it is by saying
def digits(n):
return len(str(n))
------------------------------------------
print(digits(25)) # Should print 2
print(digits(144)) # Should print 3
print(digits(1000)) # Should print 4
print(digits(0)) # Should print 1
Doing this way, we've told the system to count the number of figures that exist in the number. If it's 1000 to 9999, then it records it as 4 digits. If it's 100 - 999, then it records it as 3 digits. If it's 10 - 99, it records as 2 digits. If it's 0 - 9, then it has to record it as a single digit.
Thanks
Answer:
-4
Step-by-step explanation:
This looks like point-slope form, which I find personally hideous. Let's change it to slope-intercept form to ease my conscience. (remember that slope-intercept form is y=mx+b, where m=slope and b=y-intercept!)
y - 5 = -4(x-8)
y - 5 = -4x + 32
y = -4x + 37
It's in slope-intercept form now! And -4 looks to be our m.
<u>So the slope is -4.</u>
17. All
18. B because it can be symmetrical either way
A = (1/2)(b * h)
It is 1/2 times the product (which is the end result of multiplication of two values), of base (b) times height (h)