diff --git a/cat.gif b/cat.gif new file mode 100644 index 0000000..3cf0419 Binary files /dev/null and b/cat.gif differ diff --git a/gremlin.py b/gremlin.py index ea6630e..884e205 100644 --- a/gremlin.py +++ b/gremlin.py @@ -1,11 +1,14 @@ from cs50 import sql db = sql.SQL("sqlite:///gremlin.db") -partnumber = input("Partnumber?: ") -count = db.execute("SELECT COUNT(*) FROM pricelist WHERE Partnumber = ?;", partnumber) -rows = db.execute("SELECT * FROM pricelist WHERE Partnumber = ?;", partnumber) +search_partnumber = input("Partnumber?: ") +partnuumbers = db.execute("SELECT * FROM pricelist WHERE Partnumber = ?;", search_partnumber) -for row in rows: - print(f"{row['Partnumber']} | {row['Option']} | {row['Description']}") +for partnumber in partnuumbers: + print(f"{partnumber['Partnumber']} | {partnumber['Option']} | {partnumber['Description']}") -print(f"Found {count} products.") \ No newline at end of file +search_account = input("Account?: ") +accounts = db.execute("SELECT * FROM accounts WHERE Name = ?;", search_account) + +for account in accounts: + print(f"{account['Name']} | {account['Street']} | {account['Postal Code']} | {account['City']}") \ No newline at end of file diff --git a/home.css b/home.css new file mode 100644 index 0000000..ba2835e --- /dev/null +++ b/home.css @@ -0,0 +1,31 @@ +.centered { + text-align: center; +} + +.larger { + font-size: large; +} + +.medium { + font-size: medium; +} + +.small { + font-size: small; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +#harvard { + color: red; +} + +#yale { + color: blue; +} \ No newline at end of file diff --git a/home.html b/home.html new file mode 100644 index 0000000..b2c5de4 --- /dev/null +++ b/home.html @@ -0,0 +1,16 @@ + + + + + + + home + + + +
John Harvard
+
Welcome to my home page!
+ + + + \ No newline at end of file diff --git a/link.html b/link.html index 2c6c859..f931906 100644 --- a/link.html +++ b/link.html @@ -3,11 +3,13 @@ + link - Visit Harvard! + Visit Harvard + or Yale! \ No newline at end of file diff --git a/phonebook.html b/phonebook.html new file mode 100644 index 0000000..b5c1aed --- /dev/null +++ b/phonebook.html @@ -0,0 +1,36 @@ + + + + + + + + phonebook + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumber
Carter+1-617-495-1000
David+1-617-495-1000
John+1-949-468-2750
+ + + \ No newline at end of file diff --git a/phonebook1.html b/phonebook1.html new file mode 100644 index 0000000..2434a31 --- /dev/null +++ b/phonebook1.html @@ -0,0 +1,34 @@ + + + + + + + + + phonebook + + + + + + + + + + + + + + + + + + + + +
NameNumber
Carter+1-617-495-1000
David+1-949-468-2750
+ + + \ No newline at end of file diff --git a/search2.html b/search2.html new file mode 100644 index 0000000..aa35115 --- /dev/null +++ b/search2.html @@ -0,0 +1,62 @@ + + + + + + + + + search + + + + +
+ + + +
+ + + Happy Cat + +
+ + + +
+ +
+ +
+ + + + \ No newline at end of file