cs102 lab4
https://maths.nuigalway.ie/~gettrick/teach/cs102/2024/labs/l4.html
-
For this lab you must submit all source code (python .PY files, or
JUPYTER .IPYNB notebooks)
and, if applicable, the result(s) of running the program on (a few)
test cases. This should be uploaded (file upload) via CANVAS (not directly by email).
The source code must
be well presented (indenting, spaces, reasonable variable/function names,
etc.) and must include comments (as a rough guideline - aim to have nearly as
many comments as lines of code). Any questions asked should be answered by
typing the answers into the comments box on the CANVAS upload form.
-
This material should be uploaded
before
the deadline of 5pm
Friday March 1st., 2024. You will lose 20% for each day
(or part of day) the lab is late.
-
Plagiarism (the unattributed copying of work from other sources
(internet, fellow students,....)) will not be tolerated.
You risk getting zero for your lab if it is found to be
plagiarized.
Write a program in PYTHON that carries out linear (sequential) search
of a list L for an element x. Your program must use a
recursive function. If x is not in the list, return "not found", otherwise,
return the position of (the first occurence of) x.
The list L and x should be read in from the user - and be sure to
test your program on many examples.
©
University of Galway