Answer:
Short of being encased in a steel cage there is no way to prevent a shark attack. However there are several things you can do to lessen the chances:
- Stay in groups or at least with your dive partner
- avoid diving in the dark or during twilight hours
- don't go in the water if you are bleeding, if you cut yourself in the water
get out
- don't wear sparkly things or highly contrasting clothing
- avoid known feeding areas
- don't pee in the water
However experience and research indicates that sharks generally don't want anything to do with humans, I've randomly encountered around 10 good sized ones and they all either swam away quickly or ignored me. For example your odds of being hurt or killed in accidents involving autos, airplanes, bathtubs, and lightning are much greater
Enjoy your experience, diving rocks