Social Sciences, asked by bhandarividhan1101, 1 year ago

If all the numbers from 501 to 700 are written, what is the total number of times does the digit 6 appear?
a. 138
b. 139
c. 140
d. 141

Answers

Answered by sherin23
1
♥️HEY MATE♥️
HERE IS THE ANSWER TO YOUR QUESTION

There are 140. Here is some Python code to figure that out

>>> count = 0

>>> for num in range(500, 700):

... count += str(num).count('6')

...

>>> count

140

Note that my code stops at 699 (Python ranges don’t include the last number), but that’s OK because I know there are no sixes in the number 700).

Here’s a bash solution:

$ seq 500 700 | grep 6 > nums

$ wc -l nums

119 nums

$ grep 66 nums

566

660

661

662

663

664

665

666

667

668

669

$ grep 6.6 nums

606

616

626

636

646

656

666

676

686

696

In other words

119 numbers have at least one six

11 have two consecutive sixes

9 start and end with six

1 has three sixes

119+11+9+1=140


HOPE IT HELPS ♥️
Answered by jogipavan29
1

Answer:140

Explanation:the numbers from 501 to 599 is equal to 20

Because 506 516 526 536 546 556 566 here six appears two times ie

5 66, 576,586,596 total of 20

And from 600 to 699 is 100 times plus as it is from 600 to 700 is 20 times is said that above

Similar questions