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:
x = 0, y = 2
Step-by-step explanation:
- solve the equation for x
3x + 3(x + 2) = 6
2. Substitute the given value of x into the simplest equation y= x + 2
y = 0 + 2
3. Solve the equation for y
y= 2
4. The possible solution of the system is the ordered pair ( x, y)
( x, y) = ( 0, 2)
Answer:
Please see above
Step-by-step explanation:
I have to right stuff here but the answer is above.
Let the speed of the current equal c
and the speed of the boat in still water equal b.
b + c = 1.5 (b - c)
b + c = 1.5b - 1.5c
0.5b = 2.5c
b = 5c
The speed of the current is 1.5 mph so
b = 5 * 1.5 = 7.5 mph
Answer:
here is no question sorry