ゼロから始める Python
print() と変数から、条件分岐、ループ、文字列、コレクション、関数、ファイル、クラスまで。各トピックのあとにチャレンジがあります。
パスを始める →1 はじめの一歩 レッスン 4 件
- レッスン チャレンジ 1 件 Python で Hello World print() を使って、最初の Python プログラムを書いて文字を表示します。
- レッスン チャレンジ 2 件 Python の変数とデータ型 変数に値を入れて、Python の基本型である str, int, float, bool を学びます。
- レッスン チャレンジ 4 件 Python の数値と演算子 Python で +, -, *, /, //, %, ** を使って計算し、値を比較します。
- レッスン チャレンジ 1 件 Python でユーザー入力を受け取る input() でユーザーの入力を読み取り、数値に変換します。
2 条件分岐 レッスン 2 件
- レッスン チャレンジ 3 件 Python の if・elif・else if, elif, else で分岐し、and, or, not で条件を組み合わせます。
- レッスン チャレンジ 3 件 Even or Odd in Python Determine whether an integer is even or odd.
3 ループ レッスン 3 件
- レッスン チャレンジ 3 件 Pythonのforループ rangeとenumerateでシーケンスを反復します。
- レッスン チャレンジ 4 件 Pythonのwhileループ 条件が真の間、処理を繰り返します。
- レッスン チャレンジ 3 件 Multiplication Table in Python Print the first five multiples of a number.
4 文字列 レッスン 3 件
- レッスン チャレンジ 3 件 Python の文字列 Python の文字列で、長さ、インデックス、スライス、文字列メソッドを学びます。
- レッスン チャレンジ 3 件 Python の f-string による文字列フォーマット Python の f-strings と書式指定子で読みやすい出力を作ります。
- レッスン チャレンジ 3 件 Pythonで回文判定 大文字小文字や空白を無視して回文を判定します。
5 コレクション レッスン 5 件
- レッスン チャレンジ 4 件 Pythonのリスト リストの作成、更新、抽出、反復を学びます。
- レッスン チャレンジ 2 件 Python のタプル tuple で値をまとめ、アンパックして、関数から複数の値を返します。
- レッスン チャレンジ 1 件 Python の集合(set) Python の set で重複しない値を管理し、union と intersection で集合を組み合わせます。
- レッスン チャレンジ 3 件 Pythonの辞書 キーと値のペアを保存して処理します。
- レッスン チャレンジ 3 件 Pythonのリスト内包表記 値の変換と抽出を簡潔な式で記述します。
6 関数 レッスン 3 件
- レッスン チャレンジ 3 件 Pythonの関数 引数と戻り値を持つ関数を定義します。
- レッスン チャレンジ 1 件 Python のモジュールと import import, from ... import, エイリアスを使って Python の標準ライブラリを利用します。
- レッスン チャレンジ 2 件 Pythonでフィボナッチ数列 ループを使ってフィボナッチ数列を生成します。
7 エラーとファイル レッスン 3 件
- レッスン チャレンジ 2 件 try/exceptによる例外処理 想定できる実行時エラーを明示的に処理します。
- レッスン チャレンジ 1 件 Python のファイル操作 open() と with を使って、テキストファイルの書き込み、追記、読み取りを行います。
- レッスン チャレンジ 2 件 PythonでJSONを読み書き JSON文字列とPython辞書を相互変換します。
8 オブジェクトとクラス レッスン 2 件
- レッスン チャレンジ 1 件 Pythonのクラスとオブジェクト 状態と振る舞いを持つ独自型を定義します。
- レッスン チャレンジ 1 件 Pythonのオブジェクト指向プログラミング 実行可能な例でカプセル化、継承、オーバーライド、ポリモーフィズムを学びます。