Were submarines used in World War 1 And if there were what were the weapons used by the controller of it?

submarines were used in WW1 and the weapons used were torpedos and a deck gun.