To solve a problem with a computer, you have to understand how it works first.
Almost all computers that are in use today are digital. The analog computer is a thing of the past, so we can focus on digitial computers. The word digital in the context of computers mean that they based on binary numbers – numbers that consist only of zeroes and ones. This fact determines everything how a computer works. The amazing thing is that just with two numbers, computers can be used to solve a huge variety of tasks.
To understand how a computer achieves this feat, you have to learn to use binary numbers yourself. This is the first step towards thinking like a computer.