Assignments DE.1

Handing In Assignments

You must hand in by using git

Hand In by git

  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • git push your local repo to the above remote repo.
  • For node assignments please put the line(s)

    node_modules/

    into your .gitignore file.

Send a mail to with:

  • The word 'handin <subjectname>' in the subject line of your mail
  • The url of your repo(s).

Assignment DE.1.0

Now assume the following JavaScript assignment:

Flip a coin 10 times. Count the heads and the tails. Finish by printing the number of heads and tails.

I have created a naive model solution to this problem. It resides at the repo:

https://phidip@bitbucket.org/phidip/coinflipping.git
  • Clone this to your own computer, ie in a terminal do:
    • mkdir testdir
    • cd testdir
    • git clone https://phidip@bitbucket.org/phidip/coinflipping.git
    • The code is ready for your work.
  • Improve the solution, if nothing else, just put in a comment with your name. Name the solution cf1.js.
  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • Do not forget to change your git remote add … so that it points to your new repo, and not to ours.
  • git push your local repo to the above remote repo.

Now create the html file for testing the above in a web setting. Name the solution cf1.html, and the JavaScript cf1.js.

If you have named the files properly, save them in the same repo you used for the above assignment.

Commit your work.

Assignment DE.1.1

The other day you received several JavaScript assignments. The output of those were a series of js files. Now make sure they are all in the same directory.

Make a git repo in that directory. Stage the files. Make a screen dump of the output of the git status command.

Commit your work. Make another screen dump of the output of the git status command.

Assignment DE.1.2

Create a remote empty repo on Github, Gitlab, or Bitbucket.

Push your repo from assignment DE.1.1 to that repo.

Send me the URL of that repo.