Giter Site home page Giter Site logo

assignment-03-template's Introduction

CMPS 2200: Assignment 03

In this assignment we'll explore further sequence, map, reduce, scan, and divide and conquer algorithms.

To complete this assignment, follow the instructions in assignment-03.md (PDF version). Below you'll find important and useful information about submitting your work, using git, and testing your code.

Turning in your work

  • You may work with a partner to complete this assignment.
  • Only one team member needs to push your completed lab to github.
  • At the top of main.py and in the answers.md file, include the names of both team members.
  • Once you have pushed your final submission to GitHub, go to Canvas and submit a link to your repository to the Canvas assignment for this recitation.
    • Submit to Canvas in group with your partner.

Using Git

  • Clone your assignment repository to your local device.
  • As you complete this lab, add, commit, and push your work up to GitHub.
    • You will need to issue git add for all files that you have modified, e.g., main.py, answers.md, and any others that you modify or add to the repository as well.
    • For example, on the command line, in the same directory as your cloned lab:
      $ git add main.py
      $ git add answers.md
      $ git commit -m "Implement Required Functions, Answer all Questions"
      $ git push origin main
      
    • It is recommended that you add, commit, and push your work often in order to regularly save your work to GitHub. The latest version of your work will be what is graded.

Running and testing your code

  • You can run the tests using pytest. If you need to, install pytest. On your terminal:
    • $ pip3 install pytest
    • You may also have to install other python modules such as tabulate or other imported modules as you work through these recitations.
  • It's usually best to run only one test at a time. To run tests, from the command-line, execute:
    • $ pytest main.py to run all tests
    • $ pytest main.py::test_one to just run test_one
    • If you are having trouble with your computer finding pytest after you've installed it, you can run it as follows:
      • $ python -m pytest main.py
    • GitHub will test your code using pytest.
  • If your python is still defaulting to python version 2, explicitly use the python3 executable instead.

About Markdown

We use Markdown extensively in these recitations. Markdown is a great way to easily add formatting to simple text documents.

Here is a cheatsheet for markdown syntax.

You will notice in the recitation documents that you can format mathematical expressions in markdown. To do so, wrap them in dollar signs. You can use latex syntax within the dollar signs.

For example, the run time of our first example, linear search, this semester is $c_1n + c_2n + c_4 \in O(n)$.

More generally, the runtime of any program can be expressed as:

$$\sum_i c_i * n_i$$

for every instruction $n_i$ and its cost $c_i$.

It's easy to do powers too. Euler's identity states: $e^{ix} + 1 = 0$

Pretty cool, huh?

You can also convert from markdown to pdf. convert.sh is provided for you to convert your answers.md to answers.pdf. As the comment in the script says, you will need to install pandoc and latex, but its pretty convenient to be able to do so. You do not need to submit you answers in PDF format, but you may if you like.

assignment-03-template's People

Contributors

amaus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.