Join Exercism’s Ballerina Track for access to 12 exercises with automatic analysis of your code and personal mentoring, all 100% free.
import ballerina/http;
import ballerina/io;
service hello on new http:Listener(9090) {
resource function sayHello(http:Caller caller, http:Request request) {
http:Response response = new;
response.setTextPayload("Hello Ballerina!");
var responseResult = caller->respond(response);
if (responseResult is error) {
io:println("error responding back to client.");
}
}
}
Get better at programming through fun, rewarding coding exercises that test your understanding of concepts with Exercism.
In this exercise, you will use Ballerina Records to organize the request payloads and ensure successful communication with external reservation endpoints.
Every employee wants to work in the new office because each cubicle has state-of-the-art monitors. The HR department is overwhelmed with such requests and came up with a cubicle allocation system with the help of its digital operations team.
The classical introductory exercise. Just say "Hello, World!".
Every language has its own way of doing things. Ballerina is no different. Our mentors will help you learn to think like a Ballerina developer and how to write idiomatic code in Ballerina. Once you've solved an exercise, submit it to our volunteer team, and they'll give you hints, ideas, and feedback on how to make it feel more like what you'd normally see in Ballerina - they'll help you discover the things you don't know that you don't know.
Learn more about mentoringThe Ballerina track on Exercism has 12 exercises to help you write better code. Discover new exercises as you progress and get engrossed in learning new concepts and improving the way you currently write.
See all Ballerina exercisesThe best part, it’s 100% free for everyone.