From 404b653bd61533c6f4c210c163fe256b8b2c280b Mon Sep 17 00:00:00 2001 From: Benjamin Adovasio Date: Sat, 28 Feb 2026 13:05:58 -0500 Subject: [PATCH] initial commit for project 3 --- .DS_Store | Bin 0 -> 8196 bytes Project 3/project_3_search.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .DS_Store create mode 100644 Project 3/project_3_search.py diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..dc3fab28ec8e2d86139224aad24141a7897956f3 GIT binary patch literal 8196 zcmeHMOK%fN5Uw(T#AG28FyO#~hV_L5j}Q=IwTBE2E68$4gabGmz>GZ|XJFE8%}ioK zh-B?$5qnzr0dQYVAgwrZ=_BF9}bBf#0??QWp#Zu)m7EgpJuwHQ&@WFUK%U)u;3(7~ zgtX)QUZlRGAC#!X%@h|x01W(&$fq5V+hLBPBKioZK$CP#c0l&IWw+B(c!yP-9UY+;S#bT6 zYig-MF}Y6;RqkBO7+3WsW@i(Yme<(Rzx%hRR;v#rwOB;aq)5Uv6ny$>LiCTPY<`^2 z3L1QosGn%auH-U{6T*tqkyD=bX04zsms~R2GuYB7>q)Hb< literal 0 HcmV?d00001 diff --git a/Project 3/project_3_search.py b/Project 3/project_3_search.py new file mode 100644 index 0000000..9bf3768 --- /dev/null +++ b/Project 3/project_3_search.py @@ -0,0 +1,33 @@ +###################################### +# DCS 229 -- Project 3: Search +# Date: March 4, 2026 +# Name: Benjamin Adovasio +# Resources Used: +# https://pressbooks.palni.org/anopenguidetodatastructuresandalgorithms/chapter/search/ +# +########################################## +# import statement to support more type hints +from __future__ import annotations + +import random #to generate the 100 random values +import time #for part 4, to calculae total time + +#### Write your class here +def generate_random_list(n): + data = [] + for _ in range(n): + data.append(random.randint(0, 1000)) + + if 42 not in data: + data[random.randint(0, n - 1)] = 42 + + return data + + +### write your tests in main function +def main(): + pass + +# only execute when you run this file directily +if __name__ == "__main__": + main() \ No newline at end of file