Sample Code Post

tutorial
code
Demonstrating executable code in blog posts.
Author

Adam Claridge-Chang

Published

January 10, 2025

—title: “Sample Code Post”date: 2025-01-10description: “Demonstrating executable code in blog posts.”categories: [tutorial, code]author: “Adam Claridge-Chang”aliases: - /blog/posts/2025-01-10-code-example/index.html—

Executable Code in Blog Posts

This post demonstrates that code actually runs:

Code
import numpy as np
print(f"2 + 2 = {2 + 2}")
print(f"Random number: {np.random.rand():.4f}")
2 + 2 = 4
Random number: 0.3622