diff --git a/Homeworks/hw2/cs448.db b/Homeworks/hw2/cs448.db new file mode 100644 index 0000000..8fe4be5 Binary files /dev/null and b/Homeworks/hw2/cs448.db differ diff --git a/Homeworks/hw2/hw1.py b/Homeworks/hw2/hw1.py new file mode 100644 index 0000000..9fa48b6 --- /dev/null +++ b/Homeworks/hw2/hw1.py @@ -0,0 +1,59 @@ +import sys + +# Use this file to write your queries. Submit this file in Gradescope after finishing your homework. + +#TODO: Write your username and answer to each query as a string in the return statements in the functions below. +# Do not change the function names. + +#Make sure to test that python prints out the strings (your username and SQL queries) correctly. + +#usage:python3 hw1.py +# make sure the program prints out your SQL statements correctly. That means the autograder will read you SQL correctly. +# Running the Python3 file will not execute your SQL statements (just prints them). + +def username(): + return "srettig" # Write your username here + + +def query1(): + return """ + +""" + +def query2(): + return """ + +""" + +def query3(): + return """ + + """ + +def query4(): + return """ + +""" + +#Do not edit below + +def main(): + query_options = {1: query1(), 2: query2(), 3: query3(), 4: query4()} + + if len(sys.argv) == 1: + if username() == "username": + print("Make sure to change the username function to return your username.") + return + else: + print(username()) + for query in query_options.values(): + print(query) + elif len(sys.argv) == 2: + if sys.argv[1] == "username": + print(username()) + else: + print(query_options[int(sys.argv[1])]) + + +if __name__ == "__main__": + main()