Ejemplo n.º 1
0
 def __init__(self):
     ''' Construct a quiz object with a list of question objects '''
     
     self.problems = []
     self.problems.append(ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
     self.problems.append(ShortAnswer('What is the hottest recorded temperature in the United States', '134'))
     self.problems.append(ShortAnswer('Independence Day of India', '1947'))
     self.problems.append(TrueFalse('Sky is Blue', True))
     self.problems.append(FillInTheBlack('___ is the capital of India', 'New Delhi'))
     random.shuffle(self.problems)
     
     self.problemNum = 0
Ejemplo n.º 2
0
    def __init__(self):
        ''' Construct a quiz object with a list of question objects '''

        self.problems = []
        self.problems.append(
            ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
        self.problems.append(
            ShortAnswer(
                'What is the hottest recorded temperature in the United States',
                '134'))
        self.problems.append(TrueFalse('Fall 2014 was short', True))
        self.problems.append(
            FillInTheBlanks('Dibble means to ____ like a duck', 'quack'))

        random.shuffle(self.problems)

        self.problemNum = 0
Ejemplo n.º 3
0
    def __init__(self):
        self.problems = []
        #putting questions into the list
        self.problems.append(
            ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
        self.problems.append(
            ShortAnswer(
                'What is the hottest recorded temperature in the United States',
                '134'))
        self.problems.append(
            ShortAnswer('What is the capital of Canada', 'Ottawa'))
        self.problems.append(
            FillBlank('Calvin College is in _______', 'Grand Rapids'))
        self.problems.append(
            TrueFalse('You are in computer science class', True))
        #randomizing the questions
        random.shuffle(self.problems)

        self.problemNum = 0
Ejemplo n.º 4
0
    def __init__(self):
        ''' Construct a quiz object with a list of question objects '''

        self.problems = []
        self.problems.append(
            ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
        self.problems.append(
            ShortAnswer(
                'What is the hottest recorded temperature in the United States',
                '134'))
        self.problems.append(
            ShortAnswer("What is J. Cole's best album?",
                        '2014 Forest Hills Drive'))
        self.problems.append(
            FillInTheBlank('________ was the first President.',
                           'George Washington'))
        self.problems.append(
            TrueFalse('Cs 108 is rigorous and challenging', True))
        random.shuffle(self.problems)

        self.problemNum = 0
Ejemplo n.º 5
0
    def __init__(self):
        ''' Construct a quiz object with a list of question objects '''

        self.problems = []
        #short answer questions
        self.problems.append(
            ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
        self.problems.append(
            ShortAnswer(
                'What is the hottest recorded temperature in the United States',
                '134'))
        self.problems.append(
            ShortAnswer('Who is the first president of Russia',
                        'Boris Yeltsin'))
        #fill in the blank question
        self.problems.append(
            FillInTheBlank("Victor Norman's middle name is: ", 'Todd'))
        #True or False question
        self.problems.append(TrueFalse("Ivanna likes dogs", True))
        random.shuffle(self.problems)

        self.problemNum = 0
Ejemplo n.º 6
0
    def __init__(self):
        ''' Construct a quiz object with a list of question objects '''

        self.problems = []
        self.problems.append(
            ShortAnswer('Where were the olympics held in 1956', 'Melbourne'))
        self.problems.append(
            ShortAnswer(
                'What is the hottest recorded temperature in the United States',
                '134'))
        self.problems.append(
            ShortAnswer(
                'Who was the thirty-fourth president of the United States',
                'Dwight D. Eisenhower'))
        self.problems.append(
            FillInTheBlank('Dibble means to ________ like a duck', 'drink'))
        self.problems.append(TrueFalse('Fall 2014 was short', True))
        self.problems.append(
            TrueFalse('Stalefish is a term used in snowboarding', True))
        random.shuffle(self.problems)

        self.problemNum = 0