The piano was invented by Bartolomeo Cristofori (1655-1731) of Italy. Cristofori was unsatisfied by the lack of control that musicians had over the volume level of the harpsichord. He is credited for switching out the plucking mechanism with a hammer to create the modern piano in around the year 1700.
If you’re talking only about a standard-tuned 6-string guitar played without any extended techniques, then the lowest pitch is E2, and the highest (depending on the model) is about B5.