Practice Problems ================= The purpose of the practice problems is to allow you to test your understanding of the material we are covering in lecture. There are two types of practice problems: * **"be-a-computer" warm-up exercises**. You should do these warm-up exercises by hand. We'll provide code to allow you to check your answers. * **Programming Problems**. We will be using a system named Kattis for these problem. Kattis is a website that allows students to submit solutions to programming problems, and have them evaluated automatically by running a series of test cases on the submitted solutions. You can find information about how to use Kattis `here <../kattis.html>`_. All the files necessary to solve these problems are located in a ``pp/`` directory in your repository (make sure you run ``git pull upstream master`` to get the files). This directory contains a ``bac`` subdirectory with files you can use to check your solution to the be-a-computer exercises, and a ``kattis`` directory with the files you'll need to solve the Kattis problems. Make sure you read our `Using Kattis <../kattis.html>`_ page before you start working on the Kattis problems! Problems below with a (*) are challenge problems. Programming Basics ------------------ `Be-a-computer exercises `_ Kattis problems: - `Outside range `_ (file: ``outsiderange.py``) - `Divisible by `_ (file: ``divisibleby.py``) - `Within range `_ (file: ``withinrange.py``) Note: some of the above Kattis problems refer to files being in a ``hw`` directory; please disregard this and look in the ``kattis`` directory instead. Functions and Lists ------------------- `Be-a-computer exercises `_ Kattis problems - `Count negative `_ (file: ``countnegative.py``) - `List negate `_ (file: ``negate.py``) - (*) `A tricky problem `_ (file: ``tricky.py``) Dictionaries ------------ `Be-a-computer exercises `_ Kattis problems - `Babelfish `_ (file: ``babelfish.py``) - `Odd man out `_ (file: ``oddmanout.py``) - (*) `Secure doors `_ (file: ``securedoors.py``) Functional Programming ---------------------- `Be-a-computer exercises `_ Classes ------- `Be-a-computer exercises `_ Coding problems: (Not on Kattis) - `Paper tracking `_ (file: ``pp/journal.py``) - `Elves for Santa `_ (file: ``pp/santa.py``) Exam 1 ------ Note: These problems are not representative of the problems you will encounter in the exam. They simply build the kind of skills that will be important to do well in the exam. - `Pet `_ (file: ``pet.py``) - `Mixed Fractions `_ (file: ``mixedfractions.py``) - `Ragged Right `_ (file: ``raggedright.py``) - `Planting Trees `_ (file: ``plantingtrees.py``) - `Engineering English `_ (file: ``engineeringenglish.py``) - `Flow Layout `_ (file: ``flowlayout.py``) - `Quick Brown Fox `_ (file: ``quickbrownfox.py``) - `Train Passengers `_ (file: ``trainpassengers.py``) - `Bounding Robots `_ (file: ``boundingrobots.py``) - `Hitting the Targets `_ (file: ``hittingtargets.py``) - `Bus Numbers `_ (file: ``busnumbers.py``) - (*) `Secret Message `_ (file: ``secretmessage.py``) - (*) `Semafori `_ (file: ``semafori.py``) - (*) `Reverse Minesweeper `_ (file: ``minesweeper.py``) - (*) `Verify This, Your Majesty `_ (file: ``queens.py``) - (*) `A winning strategy? `_ (file: ``martingale.py``) Exam 2 ------ Here are a few new computational thinking exercises. - `Black Friday `_ (file: ``blackfriday.py``) - `Ferry Loading 4 `_ (file: ``ferryloading4.py``) - `Permutation Encryption `_ (file: ``permutationencryption.py``)