Giter VIP home page Giter VIP logo

si206-ds4's Introduction

ReadMe

The File we are running contains two functions, factorial and check_leap_year.

In this discussion section you will need to design test cases to test whether the code in these functions is correct.

The following section provides the syntax for invoking the methods, and English descriptions of what each function is supposed to do.

You should plan and then write tests in your groups for these methods. Then we'll test our code and see if it works!

factorial(num)

Parameter Function Description
num Accepts num (int), computes its factorial and returns the value

For example:
factorial(0) should return 1
factorial(1) should return 1
factorial(-5) should return None
factorial(5) should return 120

check_leap_year(year)

Parameter Function Description
year Accepts a year (int) and checks if it is a leap year. Returns True if it is, and False if not

For example:
check_leap_year(1900) should return False
check_leap_year(1912) should return True
check_leap_year(2000) should return True

Things to keep in mind as you go

  1. Fork the DS4 repository here - https://github.com/yjlintw/si206-ds4.

  2. Clone the DS4 repository that you just forked. Do not clone this one, you won't have the permission to push to this repo. git clone <remote repo URL>

  3. Check status continuously to keep track of changes in your code and directory git status

  4. After writing each test, add your modified code to the local repo git add <filename>

  5. Commit the changes in code to the local repo git commit -m <commit message>

  6. After each commit, check the history of your commits git log

  7. Once all test cases are done, push your code to github to the repo you had forked from DS4. (Use the same URL you had used for cloning)

git remote add origin <remote repository URL> git remote -v git push -u origin master

si206-ds4's People

Contributors

yjlintw avatar

Watchers

James Cloos 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.