[
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 Yash Sanjay Bonde\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Python-Code\nThis are Some of the Python Programs written by me\n\n\n# We will be uploading the Solidity Program written bY me We will Upload them soon We will start with the solidity as a Programming language \n"
  },
  {
    "path": "data.py",
    "content": "question_data = [\n{\"text\": \"A slug's blood is green.\", \"answer\": \"True\"},\n{\"text\": \"The loudest animal is the African Elephant.\", \"answer\": \"False\"},\n{\"text\": \"Approximately one quarter of human bones are in the feet.\", \"answer\": \"True\"},\n{\"text\": \"The total surface area of a human lungs is the size of a football pitch.\", \"answer\": \"True\"},\n{\"text\": \"In West Virginia, USA, if you accidentally hit an animal with your car, you are free to take it home to eat.\", \"answer\": \"True\"},\n{\"text\": \"In London, UK, if you happen to die in the House of Parliament, you are entitled to a state funeral.\", \"answer\": \"False\"},\n{\"text\": \"It is illegal to pee in the Ocean in Portugal.\", \"answer\": \"True\"},\n{\"text\": \"You can lead a cow down stairs but not up stairs.\", \"answer\": \"False\"},\n{\"text\": \"Google was originally called 'Backrub'.\", \"answer\": \"True\"},\n{\"text\": \"Buzz Aldrin's mother's maiden name was 'Moon'.\", \"answer\": \"True\"},\n{\"text\": \"No piece of square dry paper can be folded in half more than 7 times.\", \"answer\": \"False\"},\n{\"text\": \"A few ounces of chocolate can to kill a small dog.\", \"answer\": \"True\"}\n]"
  },
  {
    "path": "main.py",
    "content": "from question_model import Question \r\nfrom data import question_data\r\nfrom quiz_brain import Quizbrain\r\n\r\nquestion_bank = []\r\n\r\nfor question in question_data :\r\n    qtext = question['text']\r\n    qanswer = question ['answer']\r\n    newquestion = Question (text=qtext , answer=qanswer)\r\n    question_bank.append (newquestion)\r\n\r\nquiz = Quizbrain (question_bank)\r\n\r\nwhile quiz.still_has_question () :\r\n    quiz.nextquestion ()\r\n    \r\nprint (\"Your Final score is : \") \r\nprint (f\"Your final score was :  {quiz.score} / {quiz.question_number}\")       \r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "question_model.py",
    "content": "\r\nclass Question :\r\n    def __init__(self ,text , answer) :\r\n        self.text = text\r\n        self.answer = answer\r\n\r\n\r\n"
  },
  {
    "path": "quiz_brain.py",
    "content": "from cv2 import correctMatches\r\n\r\n\r\nclass Quizbrain :\r\n    def __init__(self ,q_list) -> None:\r\n        self.question_number = 0 \r\n        self.question_list = q_list\r\n        self.score = 0 \r\n\r\n    def still_has_question (self) :\r\n        return  self.question_number < len (self.question_list) \r\n                 \r\n\r\n    def nextquestion (self) :\r\n        currquestion = self.question_list[self.question_number]\r\n        self.question_number += 1 \r\n        uinput = input (f\"Q{self.question_number} : {currquestion.text} (True/False) \")   \r\n        self.checkanswer (uinput , currquestion.answer)    \r\n\r\n    def checkanswer (self , uinput , correctanswer):\r\n        if uinput == correctanswer :\r\n            self.score += 1 \r\n            print (\"You got it right \")\r\n        else :\r\n            print (\"You got it right\")\r\n        print (f\"The correct answer is {correctanswer}\")\r\n        print (f\"Your current score is {self.score}/{self.question_number}\")\r\n        print (\"\\n\")\r\n\r\n\r\n        \r\n"
  }
]