Who invented the first computer is a hard question to answer because over the years there have been many different definitions of a computer. For example, the first computing machine was invented in 1822 by Charles Babbage. You can view a complete history of the computer at: http://www.computerhope.com/issues/ch000984.htm.
Evidently, the question is not who, but what it is exactly being asked. Many will still consider the ÒAbacusÓ to be the first computer. This was invented by the Chinese between 2600 & 300 BC. However, if you mean an Òelectric computerÓ it is Alan Turing from Cambridge, UK, who worked during the WWII in cracking enigma codes that the Germans used everyday.
In the sense of a programmable machine that can carry out sequence of arithmetic or logical operations, the first concept of computer was probably made by Alan Turing in 1936 in his Turing Machine. The first automatic programmable computer (ZuseZ3) was made by Konrad Zuse in 1941. Here is the link for more info: http://www.ask.com/wiki/Computer#History_of_computing.
There are numerous schools of thought regarding the invention of the computer. Many disagreements stem from the definition of a computer or a computing device. Technically, the first computing device is considered to be the abacus, believed to have originated in China around 3000BCE.