Logo Search packages:      
Sourcecode: gally version File versions  Download package

Quiz.py

# Copyright 2010 Mackenzie Morgan <maco.m@ubuntu.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

class Quiz():
    def __init__(self, questions, num):
        self._questions = questions
        self._numQ = num
        self._numCorrect = 0

    @property
    def questions(self):
        return self._questions

class Question():

    def __init__(self, vid, optionList):
        self.vid = vid
        self.options = optionList

class Option():
    def __init__(self, word, value):
        self.word = word
        self.value = value

Generated by  Doxygen 1.6.0   Back to index