MD(X) to LiveCodes

Markdown and MDX code blocks can be easily converted to interactive LiveCodes playgrounds. See docs for details.

This code block is rendered as a LiveCodes playground:


This code block is appended with a button to a LiveCodes playground:

def factorial(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * factorial(n - 1)

print(factorial(5))
Edit in LiveCodes

This code block is appended with a link to a LiveCodes playground:

<?php
function isPrime($number) {
    if ($number <= 1) {
        return false;
    }
    for ($i = 2; $i <= sqrt($number); $i++) {
        if ($number % $i == 0) {
            return false;
        }
    }
    return true;
}

echo isPrime(13) ? 'true' : 'false';
Edit in LiveCodes

To have similar interactive playgrounds from Markdown code blocks, go to docs to get started.