************* Linear Search ************* * Feel free to use your laptop * You are strongly encourage to work with others * When you get stuck, ask those sitting around you for help * Get used to working together in the labs * Peer teaching and peer learning has been empirically shown to be very effective Pre Lab Exercises ================= #. `Chapter 8 exercise(s) `_ * 3 * 9 (use ``assert`` to test instead of their ``test`` function) --- not required, but recommended * 10 (use ``assert`` to test instead of their ``test`` function) --- not required, but recommended * 11 (use ``assert`` to test instead of their ``test`` function) --- not required, but recommended * 12 (use ``assert`` to test instead of their ``test`` function) --- not required, but recommended * 13 (use ``assert`` to test instead of their ``test`` function) --- not required, but recommended #. Write assertion tests for each of your functions above Before Kattis ============= #. Write a function ``character_is_in_while(needle: str, haystack:str) -> bool:`` * The function will ``return`` ``True`` if ``needle`` exists within ``haystack`` and ``False`` otherwise * This function must use a ``while`` loop #. Write a function ``character_is_in_for(needle: str, haystack:str) -> bool:`` * The function will ``return`` ``True`` if ``needle`` exists within ``haystack`` and ``False`` otherwise * This function must use a ``for`` loop #. Write a function ``character_is_at_while(needle: str, haystack:str) -> int:`` * The function will ``return`` the index of the first occurrence of ``needle`` within ``haystack`` and ``-1`` if it is not found * This function must use a ``while`` loop #. Write a function ``character_is_at_for(needle: str, haystack:str) -> int:`` * The function will ``return`` the index of the first occurrence of ``needle`` within ``haystack`` and ``-1`` if it is not found * This function must use a ``for`` loop Kattis Problems =============== * You should be using a scrap piece of paper to work out the ideas for the following problems * The problems you are to solve are getting too complex to try to solve by just coding * Trying to solve problems by just typing away will not yield success .. note:: If you find yourself having a particularly difficult time on any of the problems, just move on to the next one. #. https://open.kattis.com/problems/autori #. https://open.kattis.com/problems/apaxiaaans #. https://open.kattis.com/problems/hissingmicrophone #. https://open.kattis.com/problems/trik #. https://open.kattis.com/problems/pot #. https://open.kattis.com/problems/filip #. https://open.kattis.com/problems/reversebinary #. https://open.kattis.com/problems/sevenwonders #. https://open.kattis.com/problems/zamka