regarding your first requirement:
a student should be able to attend a quiz only once within 24 hours, and after 24 hours he should be able to re-attempt it again only once
Set the number of attempts to unlimitted (if I understood your case correctly). Also, decide how quiz grading method:
- This should go on until he achieves 100% in the quiz: that's why the number of attempts is unlimited. You could use the completion activity settings to make clear to a student when the quiz is completed (the checkmark will then appear)
only should be able to see the correct answers and their own attempt when they have achieved 100%: This is not possible to configure, it'd be a great feature. You can configure that a student sees his/her attempt with feedback, correct answers, or other option after a quiz is closed and not before in the Review Options section. But a quiz is considered closed only based on the date and not on the number of attempts.