Giter Site home page Giter Site logo

kotlin-koans's Introduction

Kotlin Koans

Kotlin Koans are a series of exercises to get you familiar with the Kotlin Syntax. Each exercise is created as a failing unit test and your job is to make it pass.

How to build and run tests

Working with the project using Intellij IDEA or Android Studio:

  1. Import the project as Gradle project.
  2. To build the project and run tests use 'test' task on Gradle panel.

You can also build the project and run all tests in terminal:

./gradlew test

Here https://www.jetbrains.com/help/idea/gradle.html you can read how to work with Gradle projects in IntelliJ IDEA.

How to work with Koans using this project

You have 42 tasks to do. Each task lives in its function: from task0 to task41.

You regularly have to change the function taskN by replacing its body (which starts out as the function invocation todoTaskN()), with the correct code according to the problem. The function todoTaskN() throws an exception, so you have to replace that invocation with meaningful code.

Using documentation argument you can open the related part of Kotlin online documentation. Press F1 (Quick Documentation) on docN(), then "See also" section gives you a link.

Using references argument you can navigate and see the code mentioned in the task description.

The repository has two branches, master which contains the exercises for you to do and resolutions which contains the resolved exercises. Make sure you don’t cheat!

Other ways to solve Koans

Note that you can solve the similar tasks using Educational Plugin or online:

The koans tasks for web-demo and educational plugin can be found here: https://github.com/Kotlin/kotlin-koans-edu.

kotlin-koans's People

Watchers

 avatar  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.