Charles Babbage invented the first mechanical computer called the Analytical Engine in the 1830s-1850s. A computer is an electronic device that can accept, store, and process information to produce required results. The main parts of a computer are the CPU (central processing unit), memory, input and output devices. The CPU contains the control unit and arithmetic logic unit and is responsible for processing data. Memory is used to store programs and data. Common input devices include keyboards and mice, while output devices include monitors and printers.