Thanks for your question. Members of the House of Representatives and Senators usually write the speeches they give in the chamber. They often work with speechwriters on their staff to write planned speeches to give at press conferences and other occasions.
During Question Time, answers to questions are not written beforehand. However, ministers and their staff members might prepare notes about issues they think they are likely to be questioned about.