MOJO MIJIA Guide to Mojo Programming Language
from A Pythonista's Perspective
from A Pythonista's Perspective
Run the code while you read
Throughout the Miji, every Mojo code block that forms a complete program has a Run button at the right end of its header line, beside the name of the language. Click it, and the program is compiled and executed for you, with the output appearing right below the code. You can also click the code itself and change it, so you can try your own ideas without leaving the page.
def main():
a = "Hello, world!"
print(a)
b = 0
for i in range(10):
b = b + i
print(b)a = "Hello, world!"
print(a)
b = 0
for i in range(10):
b = b + i
print(b)Official resources for Mojo
Here are some official resources for Mojo that you may find useful:
Libraries for Mojo
Here are some useful libraries for Mojo. They are written in pure Mojo and are generally ready to use. Some provide functionality similar to modules in Python's standard library that Mojo does not yet have.
Mathematical and numerical libraries:
int and decimal.Decimal types.Command-line libraries:
argparse.File parsing libraries:
json module.Other useful resources and links for Mojo
About this Miji
"Miji" is the latinization of the Chinese word 秘籍, which literally means a "secret book" or "book of tips". You can call this book "Mojo Miji", "Miji Book", or just "the Miji".