Skip to content

Commit a8d43cd

Browse files
authored
Merge branch 'main' into exponents-retry
2 parents 5a31f0e + cede375 commit a8d43cd

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Assignment: functions
22

3-
## How to clone this repo
4-
5-
Clone this repository by clicking the green button in the upper right corner, selecting `SSH` and copying the string that looks like `git@github.com:code4policy/<REPO-NAME>.git` (`<REPO-NAME>` will be the name of your repository). Then, in the terminal run the following:
6-
7-
```
8-
git clone git@github.com:code4policy/<REPO-NAME>.git
9-
```
10-
11-
Note that by default, git will clone the repository into a folder with name `<REPO-NAME>`. After the repo is cloned, open that directory (use `cd`).
3+
As usual, clone this repo to your `assignments` directory (or wherever you like to work).
124

135
## Python
146

@@ -53,7 +45,6 @@ pip install pytest # install the pytest package
5345
10. Make sure everything works correctly and issue a pull request on github back to the main branch with a message explaining what changes you made in this branch.
5446

5547
11. Accept the pull request into the main branch and delete the `calculator` branch on github.
56-
5748
12. Checkout the main branch, and pull the version of main with the calculator branch merged
5849

5950
```
@@ -67,12 +58,18 @@ pip install pytest # install the pytest package
6758
git branch -D calculator
6859
```
6960
70-
14. Add two more functions, `square` and `cube`. both should take a single number as an argument and return the number raised to the appropriate power.
61+
14. Create a new branch from `main`. In the new branch, add two more functions, `square` and `cube`. both should take a single number as an argument and return the number raised to the appropriate power.
7162
15. Make a function called `square_n_times` that takes two arguments, `number` and `n`. Have the function square the number `n` times and return the sum.
63+
16. PR the new branch to `main`. Your `calcluator.py` in `main` should now have functions for addition, subtraction, multiplication, division, squaring, cubing, and adding squares `n` times.
7264
7365
## Javascript (ungraded)
7466
75-
1. create a new branch in your `assignments` git repo called "js-calculator"
67+
### Install `node`
68+
On WSL: `sudo apt-get install npm`
69+
On Mac: `brew install npm`
70+
71+
### Tasks
72+
1. create a new branch `js-calculator`
7673
2. inside that branch create a new file called `calculator.js`
7774
7875
3. Write (in javascript) a program that defines four functions (multiply, add, subtract, and divide). These functions should not print anything, they should simply perform a mathematical operation on the two arguments and return the value.
606 Bytes
Binary file not shown.
14 KB
Binary file not shown.

0 commit comments

Comments
 (0)