Finished and ran reorganize.sh

This commit is contained in:
2026-02-09 12:00:06 -05:00
parent 87eda7839b
commit 45babd2d07
147 changed files with 1468 additions and 0 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -0,0 +1,18 @@
2026-02-06 00:05:11 INFO app=web pid=2311 msg="Server started" version=1.8.2
2026-02-06 00:06:03 INFO app=web route=/ status=200 user=anon ms=12
2026-02-06 00:07:44 WARN app=web msg="Slow query" query="SELECT * FROM courses" ms=2400
2026-02-06 00:08:12 ERROR app=web route=/login status=500 user=anon msg="Database connection failed" code=DB_CONN
2026-02-06 00:08:14 ERROR app=web route=/login status=500 user=anon msg="Database connection failed" code=DB_CONN
2026-02-06 00:09:01 INFO app=web route=/login status=200 user=anon ms=33
2026-02-06 00:10:25 ERROR app=api route=/api/grades status=500 user=ca123 msg="Timeout talking to db" code=DB_TIMEOUT
2026-02-06 00:11:18 INFO app=api route=/api/grades status=200 user=ca123 ms=80
2026-02-06 00:12:22 WARN app=web msg="Disk space low" disk=/dev/disk1 free_gb=1.2
2026-02-06 00:13:49 ERROR app=web route=/submit status=500 user=xf456 msg="Null pointer" code=NPE
2026-02-06 00:14:02 INFO app=web route=/submit status=200 user=xf456 ms=41
2026-02-06 00:15:07 ERROR app=web route=/login status=500 user=anon msg="Database connection failed" code=DB_CONN
2026-02-06 00:15:33 WARN app=web msg="Slow query" query="SELECT * FROM users" ms=3100
2026-02-06 00:16:10 INFO app=web route=/ status=200 user=anon ms=10
2026-02-06 00:17:55 ERROR app=api route=/api/login status=500 user=jl777 msg="Upstream 502 from auth-service" code=AUTH_502
2026-02-06 00:18:01 INFO app=api route=/api/login status=200 user=jl777 ms=90
2026-02-06 00:19:40 ERROR app=web route=/login status=500 user=anon msg="Database connection failed" code=DB_CONN
2026-02-06 00:20:12 INFO app=web route=/ status=200 user=anon ms=9

View File

@@ -0,0 +1,24 @@
Chris - CS
Alex - Math
Jordan - CS
Taylor - Bio
Dan - CS
Goodness - bio
Miles - Math
Bill - CS
| First Name | Last Name | Role |
| ---------- | --------------- | ------- |
| Benjamin | Adovasio | Student |
| Chris | Agbonkhese | Teacher |
| Xander | Frey | Student |
| An | Le | student |
| Jiwon | Lee | Student |
| Marquez | Narvaez-Estrada | Tutor |
| Norland | Ramirez | Student |
| Stuart | Saltonstall | student |
| Kasper | Troicki | tutor |
| Scarlett | Werns | Student |
| Dexter | Werns | Student |

BIN
Lab 1 - Group Work/.DS_Store vendored Normal file

Binary file not shown.

BIN
Lab 1 - Group Work/lab1_files/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,67 @@
#############################################################################
from typing import Callable
def testHarness(fcn: Callable, arg: str, expected: str | list) -> int:
''' function to help test an arbitrary function having one argument
Parameters:
fcn: the actual function being tested (pass without calling)
arg: the argument being passed to the tested function
expected: the expected result, either str or list in the context here
Returns:
None -- just prints
'''
result = fcn(arg) # call the student's function, passing the given argument
# see https://unicode-table.com/en/sets/check/
# replace these as you see fit
mark = "" if result == expected else ""
print(f"Testing {fcn.__name__}({repr(arg)}):")
print(f"\t {mark} result = {result}")
print(f"\t expected = {expected}")
if result == expected:
return 1 # correct +1
return 0 # incorrect +0
###################
def main_grading():
count = 0
tests = 0
arg = []; expected = 0; tests += 1
count += testHarness(compute_sum, arg, expected)
arg = [0]; expected = 0; tests += 1
count += testHarness(compute_sum, arg, expected)
arg = [1,2,3]; expected = 6; tests += 1
count += testHarness(compute_sum, arg, expected)
arg = [-1,2,-3]; expected = -2; tests += 1
count += testHarness(compute_sum, arg, expected)
arg = []; expected = None; tests += 1
count += testHarness(compute_product, arg, expected)
arg = [0]; expected = 0; tests += 1
count += testHarness(compute_product, arg, expected)
arg = [1,2,3]; expected = 6; tests += 1
count += testHarness(compute_product, arg, expected)
arg = [-1,2,-3]; expected = 6; tests += 1
count += testHarness(compute_product, arg, expected)
arg = [-1,-2,-3]; expected = -6; tests += 1
count += testHarness(compute_product, arg, expected)
arg = [-1,-2,-3,0]; expected = 0; tests += 1
count += testHarness(compute_product, arg, expected)
print('-' * 30)
print(f"Total tests passed: {count} / {tests}")
print('-' * 30)
if __name__ == "__main__":
main_grading()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,27 @@
zali Zain Ali
eamini Edward Amini
lbaron Liam Baron
lchikh Leith Rouhou
mcory Max Cory
mdonaghy Megan Donaghy
oenkhorgil Yuka Enkh-Orgil
rgleason Ryan Gleason
lhrinda Luke Hrinda
shughes2 Sarah Hughes
jjiang Jerry Jiang
ckenny Chris Kenny
tleamon Ted Leamon
mlogan Miles Logan
smaquera Sara Maquera
fmiele Fran Miele
mnijjer Mehar Nijjer
lpaynter Lucy Paynter
oputnambagley Lando Putnam-Bagley
areed2 Andrew Reed
srice Sam Rice
jroelofs Julia Roelofs
tshapiro Teddy Shapiro
mshimizu Micah Shimizu
jtapiamarte Juan Carlos Tapia Marte
myoung2 Malina Young
nzuze Noku Zuze

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2,3]))
print(compute_sum([-1,-2,-3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2,3]))
print(compute_product([-1,-2,-3]))
def main():
value = compute_sum([0])
print(value)
value = compute_sum([1,2,3])
print(value)
value = compute_sum([-1,-2,-3])
print(value)
main()

View File

@@ -0,0 +1,43 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0]))
print(compute_sum([1,2]))
print(compute_sum([3,4,5,6,7]))
print(compute_sum([-3,4,5,6,7]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0]))
print(compute_product([1,2]))
print(compute_product([3,4,5,6,7]))
print(compute_product([-3,4,5,6,7]))

View File

@@ -0,0 +1,56 @@
def compute_sum(list_: list[int]) -> int:
''' function to compute the sum of a list of integers
Parameters:
list_: a list of integers
Returns:
the integer sum of the list of integers
'''
sum_ = 0
for i in list_:
sum_ += i
return sum_
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
def compute_product(list_: list[int]) -> int | None:
''' function to compute the product of a list of integers
Parameters:
list_: a list of integers
Returns:
the product sum of the list of integers; if the list is
empty, we return None
'''
if len(list_) == 0: return None
product = 1
for i in list_:
product *= i
return product
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
def main():
print(compute_sum([0,0,0]))
print(compute_sum([1,2,3,4,5]))
print(compute_sum([-1,-2,-3,-4,-5]))
print(compute_sum([1,1,1,1,1,1,1]))
print(compute_sum([1,2,3,4,5,4,3]))
print(compute_product([0,0,0]))
print(compute_product([1,2,3,4,5]))
print(compute_product([-1,-2,-3,-4,-5]))
print(compute_product([1,1,1,1,1,1,1]))
print(compute_product([1,2,3,4,5,4,3]))
main()

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More