ナビゲーション
索引
次へ
|
コンピュータ実習I (Python)
»
コンピュータ実習I (Python)
コンピュータ実習I (Python)
¶
last modified: 20231013
1. 準備
1.1. はじめに
1.2. インストール
1.3. Python の実行
1.4. Visual Studio Code (VSCode)
1.5. Git (コマンドからの操作)
1.6. VSCode 上でのコード入力と Git 操作
1.6.1. Git Graph
1.6.2. ソースコード編集
1.6.3. ステージ & コミット
1.6.4. 演習
1.6.5. 過去のバージョンを取り出す
1.6.6. 演習
1.7. デバッガの利用
1.8. 対話的実行
2. hello, pygame
2.1. フォルダの準備
2.2. 図形の描画
2.2.1. 変更履歴を記録する
2.3. ループとキー入力
2.4. マウス入力対応
2.5. マウス入力対応 (再挑戦)
2.6. 画像の表示
2.7. 文字の表示
2.8. 文字と画像の同時表示
2.9. pygame のリファレンスマニュアルを読む
2.10. import 文
2.11. 演習
3. 基本的なプログラミング (制御構造編)
3.1. 基本的な計算
3.1.1. 文の実行
3.1.2. 変数と演算
3.1.3. 型と型変換
3.1.4. 実践編
3.2. 関数
3.2.1. 関数定義と関数呼び出し
3.2.2. 実践編
3.3. 制御文
3.3.1. 条件文
3.3.2. 繰り返し文
3.3.3. 実践編
3.3.4. if __name__ == "__main__"
3.4. デバッグのコツ
3.4.1. エラーメッセージを理解する
3.4.2. デバッガを活用する
3.5. 演習
4. 基本的なプログラミング (データ構造編)
4.1. リスト (list型)
4.1.1. シーケンス
4.1.2. リストのいろいろな作成方法
4.1.3. リストの変更
4.1.4. 実践編
4.2. リストと類似したデータ構造
4.2.1. タプル (tuple型)
4.2.2. 文字列 (str型)
4.2.3. 辞書 (dict型)
4.2.4. 実践編
4.3. 演習
4.4. Python のデータモデル
4.4.1. 変数は箱ではない
4.4.2. Online Python Tutor
4.4.3. リスト以外も同じこと
4.4.4. is と == (is not と !=)
4.4.5. 実践編
4.4.6. 関数呼び出しと変数の関係
4.4.7. リストを使いこなす
4.5. 演習
4.6. docstring を書く
4.7. 演習
5. オブジェクト指向への第一歩
5.1. 枠組みだけを作る
5.2. 放物運動
5.3. データをまとめる
5.4. データの操作を整理する
5.5. データとその操作をまとめる
5.6. 結局何をしたのか
5.7. もう少し整理する
5.7.1. World
5.7.2. AppMain
5.8. 演習
6. プログラムの修正と拡張
6.1. モジュール
6.2. 単体テスト
6.2.1. 単体テストの心理的効果
6.2.2. VSCode からのテスト実行
6.2.3. 複数条件の自動展開
6.3. 機能変更を伴わない修正
6.3.1. メソッドの切り出し
6.3.2. 抽象度の高いオブジェクトに置き換える
6.4. クラスの継承
6.4.1. 跳ね返り処理の仮実装
6.4.2. 跳ね返り処理を真面目に考える
6.4.3. ポリモーフィズム
6.5. オブジェクト合成
6.5.1. Strategy パターン
6.5.2. 状態を持つストラテジオブジェクトを作る
6.5.3. 継承とオブジェクト合成
6.6. 汎用性の高い関数
6.6.1. ソートアルゴリズムの例
6.6.2. いろいろなソート順序
6.6.3. ソート関数の内容を直接書き換える (非推奨)
6.6.4. ソート関数に比較関数を渡せるようにする
6.6.5. ソート関数に比較キー関数を渡す
6.7. 演習
7. バネ・質点系の力学シミュレーション
7.1. まず試してみる
7.1.1. 質点を配置
7.1.2. 壁・床を配置
7.1.3. バネを配置
7.1.4. 質点間の衝突解決
7.1.5. 描画処理のカスタマイズ
7.2. Slinky Drop シミュレーション
7.3. インタラクティブ放物シミュレーション
7.3.1. 質点と壁と衝突処理
7.3.2. バネを追加
7.4. spring_mass モジュールを作る
7.4.1. 基本設計
7.4.2. 質点
7.4.3. 固定質点
7.4.4. バネ
7.4.5. 破断するバネ
7.4.6. 衝突解決
7.4.7. 壁・床
7.4.8. 床面への潜り込みの回避
7.5. 演習
8. 発展的な事例
8.1. 布シミュレーション
8.1.1. バネ・質点メッシュを配置
8.1.2. マウスによるインタラクション
8.1.3. バネの破断
8.2. 3 次元シミュレーションとその可視化
8.2.1. spring_mass.py の 3D 化
8.2.2. 3D 可視化モジュール vis3d.py
8.2.3. 座標変換
8.2.4. 透視投影
8.2.5. マウスによるインタラクション
8.2.6. 遮蔽関係の表現
付録
A. Python ミニ・チュートリアル
A.1. 文の実行
A.1.1. 上から 1 行ずつ実行される
A.1.2. コメント
A.1.3. 行の継続
A.2. 変数と演算
A.2.1. 算術式
A.2.2. 変数と代入
A.2.3. 型と型変換
A.3. 関数
A.3.1. 関数の定義
A.3.2. 関数の呼び出し
A.3.3. デフォルト引数とキーワード引数
A.4. 制御文
A.4.1. if 文と仲間たち
A.4.2. 条件の書き方
A.4.3. while文・for 文
A.4.4. break文・continue文
A.4.5. グローバル変数とローカル変数
A.5. リスト (list型)
A.5.1. シーケンスの操作
A.5.2. リストの作成
A.5.3. リスト要素の変更
A.5.4. リストの伸縮
A.6. リストと類似したデータ構造
A.6.1. タプル (tuple型)
A.6.2. 文字列 (str型)
A.6.3. 辞書 (dict型)
A.7. 複合的なデータ構造
B. 配布する開発環境の構築手順
B.1. 想定環境
B.2. ダウンロード
B.3. インストール
B.4. 設定完了後の配布版の作成
Indices and tables
¶
索引
検索ページ
[ Japanese |
English
]
クイック検索
総合目次
1. 準備
2. hello, pygame
3. 基本的なプログラミング (制御構造編)
4. 基本的なプログラミング (データ構造編)
5. オブジェクト指向への第一歩
6. プログラムの修正と拡張
7. バネ・質点系の力学シミュレーション
8. 発展的な事例
付録
A. Python ミニ・チュートリアル
B. 配布する開発環境の構築手順
この章の内容
コンピュータ実習I (Python)
Indices and tables
次のトピックへ
1.
準備
ナビゲーション
索引
次へ
|
コンピュータ実習I (Python)
»
コンピュータ実習I (Python)