#roster.py import cs50 from sys import exit, argv if len(argv) != 2: print("invalid number of command line arguments") exit(1) studb = cs50.SQL("sqlite:///students.db") students = studb.execute("SELECT first, middle, last, birth, house FROM students WHERE house = ?", argv[1]) for wiz in students: if wiz["middle"] == '': print(wiz["first"], end = " ") print(wiz["last"], end = " ") print("born " + str(wiz["birth"])) #print(wiz[first], wiz[last], house) else: print(wiz["first"], end = " ") print(wiz["middle"], end = " ") print(wiz["last"], end = " ") print("born " + str(wiz["birth"]))