0Pricing
Mojo Academy · レッスン

PythonのスーパーセットとしてのMojo

なじみのある構文に新たな高速化機能を加えます

「PythonのスーパーセットとしてのMojo」はCoddyKit上の無料Mojo Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMojo Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Mojo Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Python, Plus More

Mojo is built as a superset of Python: the Python you know is a starting point, with new powers layered on top. 🧩

Syntax You Recognize

Indentation, colons, and clean keywords stay the same. A Mojo for loop reads just like its Python cousin.

for i in range(3):
    print(i)

Same Familiar Functions

Everyday tools like print and range carry straight over, so your existing Python habits keep working in Mojo.

print("Mojo feels familiar")

A Gradual On-Ramp

You can start writing Python-flavored code today and adopt Mojo's faster features gradually, at your own pace.

New Keyword: var

Mojo adds var to declare a variable explicitly, which makes your intent clear and helps the compiler optimize.

var count = 10

Optional Type Annotations

You can tag values with a type like Int. This is optional Python syntax in Mojo that unlocks real speed.

var score: Int = 100

Two Kinds of Functions

Mojo keeps Python's def but adds fn for stricter, faster functions. You choose how much rigor you want.

fn add(a: Int, b: Int) -> Int:
    return a + b

Structs for Speed

Beyond classes, Mojo offers the struct: a fast, statically typed way to bundle data and behavior together.

struct Point:
    var x: Int
    var y: Int

Superset, Growing Toward Full

Mojo aims to eventually run all valid Python, while today it already covers a familiar, useful subset plus its own features.

Keep Your Mental Model

Because the foundation is Python, your existing mental model transfers. You add new tools rather than relearning everything.

Familiar Feel, New Ceiling

The big idea: Mojo feels like Python but raises the performance ceiling far above what pure Python can reach. ⚡

Quick Check

Recall what being a Python superset really gives you.

Recap

You saw Mojo keep Python's syntax while adding var, type annotations, fn, and struct, giving you a smooth upgrade path. 🎯

よくある質問

「PythonのスーパーセットとしてのMojo」レッスンは無料ですか?

はい。「PythonのスーパーセットとしてのMojo」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Mojo Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Mojo Academyコースには全4レッスンが含まれています。

「PythonのスーパーセットとしてのMojo」で何を学びますか?

なじみのある構文に新たな高速化機能を加えます ブラウザで直接実行するハンズオンコードでMojo Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Mojo Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMojo Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「PythonのスーパーセットとしてのMojo」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMojo Academyレッスンでコードを書いて実行できますか?

はい。すべてのMojo Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Mojoはどのような問題を解決するのか
  2. PythonのスーパーセットとしてのMojo
  3. AIスタックにおけるMojoの位置付け
  4. コンパイルされた速度とPythonらしい使い心地
← Mojo Academyに戻る