While Hercule Poirot, Nick and Captain Hastings are sitting at a table outside the hotel, supposedly a bullet passes through Nick's hat and ends up on the ground near the table, which Hercule finds. Who shot the bullet? Did Nick make the hole in the hat earlier and then drop a bullet on the ground?
The bullet had struck the terrace of the hotel close to Poirot, and Hastings mistook it for a pebble:
‘Eh, ma foi, I do not say that if a bullet should strike the wall by my head, I would not investigate the matter! One is human after all!’
A little pebble had just struck the terrace beside us, and Poirot's fanciful analogy from it tickled my fancy. He stooped now and picked up the pebble as he went on.
Agatha Christie (1932). Peril at End House, chapter 1. London: Collins.
More or less immediately Nick came into sight in the hotel garden:
Suddenly, to my surprise, [Poirot] rose and descended the couple of steps that led from the terrace to the garden. As he did so, a girl came into sight hurrying up towards us.
Nick could not have dropped the bullet and then immediately appeared at the other end of the garden, so she must have fired the shot. Presumably she fired it from behind the cover of bushes in the garden. The shot must have been at extreme range, or with a reduced charge, for Hastings, who had fought in France in World War I and must have been familiar with being shot at, to have mistaken it for a pebble. Nick relied on the noise of motor-boats to cover the sound:
‘All this morning, my friend, speedboats have been making trips in the bay. You complained at first—soon, you did not even notice. But, ma foi, you could fire a machine gun almost and not notice it when one of those boats is on the sea.’
Nick could have fired the shot through her hat, or as suggested in the question, she could have made the holes in preparation, before coming to the hotel. She had planned to leave the hat with Poirot, knowing that he would not miss the holes, in order to create an independent witness to the supposed attacks on her life:
‘And then—she sees my name in the paper. (I told you, Hastings, everyone knew Hercule Poirot!) and she has the audacity to make me an accomplice! The bullet through the hat that falls at my feet. Oh! the pretty comedy. And I am taken in! I believe in the peril that menaces her! Bon! She has got a valuable witness on her side.’