[{"id":1064983,"question":"<p>How mode is used to overwite a file</p>","choices":[{"text":"<p>read (r)</p>","value":"A"},{"text":"<p>Write (w)</p>","value":"B"},{"text":"<p>append (a)</p>","value":"C"},{"text":"<p>excute (x)</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064982,"question":"<p>What does the with statemetn do when handling files.</p>","choices":[{"text":"<p>Keeps the file open</p>","value":"A"},{"text":"<p>Ensures the file is closed</p>","value":"B"},{"text":"<p>Delects the file</p>","value":"C"},{"text":"<p>Reades the file</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064981,"question":"<p>What happens in the exceptblock.</p>","choices":[{"text":"<p>Code execution stops</p>","value":"A"},{"text":"<p>Handles the error</p>","value":"B"},{"text":"<p>Creates a new file</p>","value":"C"},{"text":"<p>Compiles the code</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064980,"question":"<p>What does the try block do?</p>","choices":[{"text":"<p>Catches errors</p>","value":"A"},{"text":"<p>Test code for errors</p>","value":"B"},{"text":"<p>Terminates the program</p>","value":"C"},{"text":"<p>Writes to files</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064978,"question":"<p>How does OOP make code scalable</p>","choices":[{"text":"<p>One class only</p>","value":"A"},{"text":"<p>Easy modifications</p>","value":"B"},{"text":"<p>Fewer objects</p>","value":"C"},{"text":"<p>Avoids functions</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064977,"question":"<p>Which OOP principle allows code reuse.</p>","choices":[{"text":"<p>Encapsulation&nbsp;</p>","value":"A"},{"text":"<p>Inheritance</p>","value":"B"},{"text":"<p>Polymorphism</p>","value":"C"},{"text":"<p>All</p>","value":"D"},{"value":"E"}],"correctAnswer":4},{"id":1064976,"question":"<p>What does ‘self’ represent?</p>","choices":[{"text":"<p>Global variable</p>","value":"A"},{"text":"<p>The class</p>","value":"B"},{"text":"<p>Instanceof the class</p>","value":"C"},{"text":"<p>Built -in function</p>","value":"D"},{"value":"E"}],"correctAnswer":3},{"id":1064975,"question":"<p>What does the describe() method do?</p>","choices":[{"text":"<p>Initializes the object</p>","value":"A"},{"text":"<p>Describes he toy car</p>","value":"B"},{"text":"<p>Creates a toy car</p>","value":"C"},{"text":"<p>Modifies attributes</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064974,"question":"<p>What does the ‘______ init________’ method do.</p>","choices":[{"text":"<p>Defines a class</p>","value":"A"},{"text":"<p>Initializes attributes</p>","value":"B"},{"text":"<p>Creates a class</p>","value":"C"},{"text":"<p>Deletes an object</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064973,"question":"<p>How does OOP help incode management.</p>","choices":[{"text":"<p>Complicates code</p>","value":"A"},{"text":"<p>Organizes into classes</p>","value":"B"},{"text":"<p>Reduces reuse</p>","value":"C"},{"text":"<p>Eliminates functions</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064972,"question":"<p>What is an object in Python.</p>","choices":[{"text":"<p>Instance of a class</p>","value":"A"},{"text":"<p>Template for classes</p>","value":"B"},{"text":"<p>Type of variable</p>","value":"C"},{"text":"<p>Build -in function</p>","value":"D"},{"value":"E"}],"correctAnswer":1},{"id":1064971,"question":"<p>What is Object -Oriented programming (OOP)?</p>","choices":[{"text":"<p>Code with functions</p>","value":"A"},{"text":"<p>Code with classes and objects</p>","value":"B"},{"text":"<p>Single file coding</p>","value":"C"},{"text":"<p>Procedural programming</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064970,"question":"<p>What is a key advantage of using modules.</p>","choices":[{"text":"<p>Harder to read</p>","value":"A"},{"text":"<p>Easier maintenance</p>","value":"B"},{"text":"<p>No comments</p>","value":"C"},{"text":"<p>Fewer functions</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064969,"question":"<p>What does breaking a program into modules promote.</p>","choices":[{"text":"<p>Code duplication&nbsp;</p>","value":"A"},{"text":"<p>Code reuse</p>","value":"B"},{"text":"<p>Increased complexity</p>","value":"C"},{"text":"<p>Longer development</p>","value":"D"},{"value":"E"}],"correctAnswer":2},{"id":1064968,"question":"<p>How does the standard library help programmers.</p>","choices":[{"text":"<p>Complex algorithms</p>","value":"A"},{"text":"<p>Pre built solutions</p>","value":"B"},{"text":"<p>More coding</p>","value":"C"},{"text":"<p>Limited functionality</p>","value":"D"},{"value":"E"}],"correctAnswer":2}]