Repository: BondeYash/Python-Code
Branch: main
Commit: b08bb5ece2e6
Files: 6
Total size: 4.0 KB
Directory structure:
gitextract_nqs3c6v1/
├── LICENSE
├── README.md
├── data.py
├── main.py
├── question_model.py
└── quiz_brain.py
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2022 Yash Sanjay Bonde
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Python-Code
This are Some of the Python Programs written by me
# 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
================================================
FILE: data.py
================================================
question_data = [
{"text": "A slug's blood is green.", "answer": "True"},
{"text": "The loudest animal is the African Elephant.", "answer": "False"},
{"text": "Approximately one quarter of human bones are in the feet.", "answer": "True"},
{"text": "The total surface area of a human lungs is the size of a football pitch.", "answer": "True"},
{"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"},
{"text": "In London, UK, if you happen to die in the House of Parliament, you are entitled to a state funeral.", "answer": "False"},
{"text": "It is illegal to pee in the Ocean in Portugal.", "answer": "True"},
{"text": "You can lead a cow down stairs but not up stairs.", "answer": "False"},
{"text": "Google was originally called 'Backrub'.", "answer": "True"},
{"text": "Buzz Aldrin's mother's maiden name was 'Moon'.", "answer": "True"},
{"text": "No piece of square dry paper can be folded in half more than 7 times.", "answer": "False"},
{"text": "A few ounces of chocolate can to kill a small dog.", "answer": "True"}
]
================================================
FILE: main.py
================================================
from question_model import Question
from data import question_data
from quiz_brain import Quizbrain
question_bank = []
for question in question_data :
qtext = question['text']
qanswer = question ['answer']
newquestion = Question (text=qtext , answer=qanswer)
question_bank.append (newquestion)
quiz = Quizbrain (question_bank)
while quiz.still_has_question () :
quiz.nextquestion ()
print ("Your Final score is : ")
print (f"Your final score was : {quiz.score} / {quiz.question_number}")
================================================
FILE: question_model.py
================================================
class Question :
def __init__(self ,text , answer) :
self.text = text
self.answer = answer
================================================
FILE: quiz_brain.py
================================================
from cv2 import correctMatches
class Quizbrain :
def __init__(self ,q_list) -> None:
self.question_number = 0
self.question_list = q_list
self.score = 0
def still_has_question (self) :
return self.question_number < len (self.question_list)
def nextquestion (self) :
currquestion = self.question_list[self.question_number]
self.question_number += 1
uinput = input (f"Q{self.question_number} : {currquestion.text} (True/False) ")
self.checkanswer (uinput , currquestion.answer)
def checkanswer (self , uinput , correctanswer):
if uinput == correctanswer :
self.score += 1
print ("You got it right ")
else :
print ("You got it right")
print (f"The correct answer is {correctanswer}")
print (f"Your current score is {self.score}/{self.question_number}")
print ("\n")
gitextract_nqs3c6v1/ ├── LICENSE ├── README.md ├── data.py ├── main.py ├── question_model.py └── quiz_brain.py
SYMBOL INDEX (7 symbols across 2 files)
FILE: question_model.py
class Question (line 2) | class Question :
method __init__ (line 3) | def __init__(self ,text , answer) :
FILE: quiz_brain.py
class Quizbrain (line 4) | class Quizbrain :
method __init__ (line 5) | def __init__(self ,q_list) -> None:
method still_has_question (line 10) | def still_has_question (self) :
method nextquestion (line 14) | def nextquestion (self) :
method checkanswer (line 20) | def checkanswer (self , uinput , correctanswer):
Condensed preview — 6 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5K chars).
[
{
"path": "LICENSE",
"chars": 1074,
"preview": "MIT License\n\nCopyright (c) 2022 Yash Sanjay Bonde\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "README.md",
"chars": 209,
"preview": "# Python-Code\nThis are Some of the Python Programs written by me\n\n\n# We will be uploading the Solidity Program written b"
},
{
"path": "data.py",
"chars": 1109,
"preview": "question_data = [\n{\"text\": \"A slug's blood is green.\", \"answer\": \"True\"},\n{\"text\": \"The loudest animal is the African El"
},
{
"path": "main.py",
"chars": 556,
"preview": "from question_model import Question \r\nfrom data import question_data\r\nfrom quiz_brain import Quizbrain\r\n\r\nquestion_bank "
},
{
"path": "question_model.py",
"chars": 121,
"preview": "\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"
},
{
"path": "quiz_brain.py",
"chars": 997,
"preview": "from cv2 import correctMatches\r\n\r\n\r\nclass Quizbrain :\r\n def __init__(self ,q_list) -> None:\r\n self.question_nu"
}
]
About this extraction
This page contains the full source code of the BondeYash/Python-Code GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 6 files (4.0 KB), approximately 1.1k tokens, and a symbol index with 7 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.