Esempio n. 1
0
def getRandomVerbQuestion(user_profile):
    englishVerb = quizUtility.generateVerb(user_profile)
    latinVerb = englishVerb.translation
    person = random.randrange(1,7)
    
    question = getEnglishPronoun(person) + " " + englishVerbs.getEnglishVerbForm(englishVerb,person,'Present Active')
    answer = latinVerbs.getLatinVerbForm(latinVerb,person,'Present Active')
    return (question,answer)
Esempio n. 2
0
def twoWordNominativeSentence(user_profile):
    englishVerb = quizUtility.generateVerb(user_profile)
    latinVerb = englishVerb.translation
    
    englishNoun = quizUtility.getCompatibleNoun(englishVerb,user_profile,'subject')
    latinNoun = englishNoun.translation
    
    subjectPlurality = random.choice( ('singular', 'plural') )
    verbPerson = 3
    if subjectPlurality == 'plural':
        verbPerson = 6
    
    question = ("The " + englishNouns.getEnglishNounForm(englishNoun,subjectPlurality)
                + " " + englishVerbs.getEnglishVerbForm(englishVerb,verbPerson,'Present Active') +"." )
    answer = latinNouns.getLatinNounForm(latinNoun,'nominative',subjectPlurality) + " " + latinVerbs.getLatinVerbForm(latinVerb,verbPerson,'Present Active')
    return (question,answer)