CMR 2017 MCQ

MINING GURUKUL
By -

 

import random class MCQ: def __init__(self, question, options, answer): self.question = question self.options = options self.answer = answer def display_question(self): print(self.question) random.shuffle(self.options) # Shuffle options to make it more dynamic for i, option in enumerate(self.options, start=1): print(f"{i}. {option}") def check_answer(self, user_answer): return user_answer.lower() == self.answer.lower() # Define MCQs mcqs = [ MCQ("What form should be used to submit the notice for commencement of any mining operation?", ["a) Form A", "b) Form B", "c) Form specified by the Chief Inspector", "d) No specific form required"], "c"), MCQ("Who should the notice of opening be submitted to?", ["a) Chief Inspector and District Magistrate", "b) Chief Inspector and Regional Inspector", "c) Regional Inspector and District Magistrate", "d) Regional Inspector and Safety Officer"], "b"), MCQ("What should accompany the notice of opening?", ["a) Safety Management Plan", "b) Environmental Impact Assessment Report", "c) Geological Survey Report", "d) Mining Lease Agreement"], "a"), MCQ("When should the surface plan and Safety Management Plan be submitted for an already opened mine?", ["a) Within 30 days", "b) Within 60 days", "c) Within 90 days", "d) Within 120 days"], "b"), MCQ("Who should be informed about the actual date of opening?", ["a) Chief Inspector and Regional Inspector", "b) Regional Inspector and District Magistrate", "c) District Magistrate and Safety Officer", "d) Safety Officer and Chief Engineer"], "a"), MCQ("When should the owner submit annual returns for a mine?", ["a) On or before 1st day of February", "b) On or before 1st day of March", "c) On or before 1st day of April", "d) On or before 1st day of May"], "a"), ] # Function to present MCQs in an exam-like interface def present_exam(mcqs): score = 0 total_questions = len(mcqs) for i, mcq in enumerate(mcqs, start=1): print(f"Question {i}:") mcq.display_question() user_answer = input("Your answer: ") if mcq.check_answer(user_answer): print("Correct!") score += 1 else: print("Incorrect!") print(f"Correct answer: {mcq.answer}") print() print(f"You scored {score} out of {total_questions}") # Present the exam present_exam(mcqs)
3/related/default