Exemplo n.º 1
0
from engine.student.jsonmodel import StudentModel
from engine.instructor.instructor import Instructor

@click.command()
def hello():
    click.echo("Hello. How are you?")

if __name__ == "__main__":
    # username, password = tuple(input("Hello. Welcome to the Vocabulary ITS\n"
          # "To begin enter your username and password: "******"wasif"
    password = "******"

    s = StudentModel(username, password)
    d = DomainModel()
    I = Instructor(d, s, 3)

    choice = 1
    while True:
        print("\n"
              "[0] Check Vocabulary Profile\n"
              "[1] Take a Quiz (3 questions)\n"
              "[2] Quit")
        choice = int(input())
        if choice == 0:
            while True:
                choice = input("Enter a word to search, or 'b' to go back, or 'x' to quit: ").lower()
                if choice == 'x':
                    break
                if choice == 'b':
                    break
Exemplo n.º 2
0
def quiz():
    I = Instructor(D, S, 20)
    return jsonify(I.get_quiz())