Homework for students
You can do the Problem Sets in whatever language you wish. Templates will be provided for Java, C++, and Python! (WIP, coming soon)
Make sure you follow the submission instructions located here
If you've already cloned this repository locally and want to update the repository to get new code from this repository, run the command:
git pull
This is where you submit your code. We understand and accept the fact that you can see everyone else's submissions. We are not going to do anything to prevent you from cheating. Keep in mind that this is an Honors course, meant for enriching your knowledge. You gain absolutely nothing from cheating.
##How do I set up git and submit homework assignments?
Do you have git? If yes, skip to 2.
- Get Git
- For Windows : Download git bash - https://git-for-windows.github.io and install.
- For Mac: open terminal and paste this command and hit enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" && brew install git
- For Linux:
sudo apt-get install git
(replace apt-get with your OS's package manager)
- On https://github.com/CS196Illinois/Submissions, Fork the repository (top right corner) to your own Github
- Run the following command in git bash (or terminal for Mac and Linux users):
git clone https://github.com/[YOUR_GITHUB_USERNAME]/Submissions
. Replace [YOUR_GITHUB_USERNAME] with your username. - Make a new folder and name it your NETID
- copy the files from this weeks PSet directory into the NETID folder
Example File structure
Submissions
├── PS1
│ └── EXAMPLE_NETID
│ ├── Anagram.java
│ ├── Anagram.txt
│ ├── Diagonal.java
│ ├── Diagonal.txt
│ ├── PS1.txt
│ ├── Stairs.java
│ └── Stairs.txt
└── README.md
or, for example, if you were to do it in Python instead of Java:
Submissions
├── PS1
│ └── EXAMPLE_NETID
│ ├── Anagram.py
│ ├── Anagram.txt
│ ├── Diagonal.py
│ ├── Diagonal.txt
│ ├── PS1.txt
│ ├── Stairs.py
│ └── Stairs.txt
└── README.md
... etc - Solve the problems!!! <<<<<<< HEAD
- When you are ready to submit, type into console, (after making sure you are in the proper the directory) and only for the first time run:
git remote add origin https://github.com/[YOUR_GITHUB_USERNAME]/submissions
======= <<<<<<< HEAD - When you are ready to submit, type into console, (after making sure you are in the proper the directory) and only for the first time run:
git remote add origin https://github.com/[YOUR_GITHUB_USERNAME]/submissions
======= - Following that (in the same directory), add your changes files to be staged for a commit, and commit your changes:
git add [FILE]
and then agit commit -m "PSET submission"
- then run
git push origin master
(you may need togit pull
to catch up to master) - On github.com/[YOUR_USERNAME]/Submissions, click the button for a new pull request (on the right sidebar)
- To the complete the new pull request: set the base fork HEAD to cs196illinois:submissions and the head fork HEAD to [yourGithubID]:master
- Once you are done with the pull request, PAT YOURSELF ON THE BACK!!!
- wait for a response (either accepting or rejecting the merge). Poke your Course Assistant if it takes more than a few hours.
- When you want to start working on the next assignment, run the following:
git remote add upstream https://github.com/CS196Illinois/submissions
. This sets another remote called upstream. for you to push to and pull from. You can then pull any changes from our repository into yours with the commandgit pull upstream submission
. Repeat steps 10 through 15 for subsequent PSets! SEE EXAMPLE ENTRY IN PS1 for SUBMISSION FORMAT!!!