Computational thinking
導入済み
14:30
計算思考
あるタスクがあります:全店舗の在庫管理システムを構築することです。すべての商品、すべての売上、すべての入荷、すべてのレポートを含みます。一つの巨大な問題として捉えると、それは…にまで大きすぎて...
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| computational thinking/ˌkɒmpjuːˈteɪʃənl ˈθɪŋkɪŋ/ | 計算思考 |
| abstraction/əbˈstrækʃn/ | 抽象化 |
| decomposition/ˌdiːkɒmpəˈzɪʃn/ | 分解 |
| pattern recognition/ˈpætn ˌrekəɡˈnɪʃn/ | パターン認識 |
| algorithms/ˈælɡərɪθəmz/ | A finite sequence of precise steps for solving a problem or carrying out a task. |
| model/ˈmɒdl/ | A simplified representation of a system used to explain, analyse or predict its behaviour. |
| variable name | A name used in a program to refer to a stored value. |
| memory address/ˈmeməri əˈdres/ | A number that identifies a location in memory. |
| function/ˈfʌŋkʃn/ | 関数 |
| block of code | A group of program instructions treated as one unit. |
| class/klæs/ | A definition of the data and actions shared by a group of objects. |
| attributes/ˈætrɪbjuːts/ | A named property or characteristic associated with an object, element or record. |
| module/ˈmɒdjuːl/ | モジュール |
| breaking a large problem into smaller sub-problems | The process of dividing a large problem into smaller problems that are easier to solve. |
| sub-tasks | Smaller tasks that together make up a larger task. |
| sub-problem/sʌb ˈprɒbləm/ | サブ問題 |
| procedure/prəˈsiːdʒə/ | 手続 |
| sub-modules | Smaller program parts that make up a larger module. |
| library routine/ˈlaɪbrəri ruːˈtiːn/ | A ready-made set of instructions that can be reused in programs. |
| structure chart/ˈstrʌktʃə tʃɑːt/ | 構造図 |
| Algorithm design | The process of creating a step-by-step solution to a problem. |
意図的に歪められた地図
- 1931年、失業中の製図家ハリー・ベックがロンドン地下鉄の地図を描き直した。
- 彼は現実の地理を捨てた: すべての線が直線になり、すべての駅が等間隔になった。
- この地図は「正しくない」ものだったが、即座に使いやすくなった。世界中のメトロ地図はこのデザインを模倣している。
- ベックは乗客が必要とするものだけを残した: 駅とそれらがどのように接続されているか。これはコンピュータが存在する以前からの計算的思考である。

計算思考とは何か
- 問題を分析し、コンピュータが実行できる解決策を設計するための mentale ツールのセットである。
- カリキュラムではそのうち2つを明記している: 抽象化と分解。
- それらを支えるものが2つある: パターン認識とアルゴリズムの設計である。
抽象化
- 抽象化とは、問題の本質的な特徴を維持し、無関係な詳細を無視することで、より単純なモデルを提供することである。
- 地下鉄の地図は駅と路線を残し、地理情報を捨てる。
- 変数名はメモリアドレスを隠蔽し、関数名はコードブロックを背後に隠し、クラスはシステムが必要な属性のみを残す。

抽象化は問題の本質的な特徴のみを残し、無関係な詳細を捨てる

Abstraction means:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Abstraction simplifies a problem to its essentials. Breaking into parts is decomposition.
A train map that keeps the stations and lines but drops the real geography is an example of abstraction.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
It keeps what matters (stations, connections) and discards the rest — exactly what abstraction does.
目的と利点
- 目的: 解決するために必要な詳細のみを含む、問題のより単純なモデルを作成することである。
- 利点: 問題を理解したりプログラムしたりするのが容易になる; プログラムは小さく、書いたりテストしたりする時間が短くなる; 同じモデルを類似した問題に再利用できる。
- 出題者は目的と利点を別々に求める。両方とも覚えること。
Select すべて the statements that are benefits of abstraction.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Abstraction drops detail, so keeping every detail is the opposite of it, and it says nothing about hardware. The three real benefits are understanding, size/speed of development, and reuse.
このカードは修正されたため、翻訳が更新されるまで英語で表示されます。
Worked example: an abstract model
- A coffee shop stores, for each loyalty-card customer: ID, name, home address, email, mobile number, date of birth, points, and date of last visit.
- A new module looks customers up by ID and emails a personalised voucher to customers who have not visited for 30 days. Which data does it need?
- Needed: ID (to look the customer up), email (to send to), name (to personalise the message), date of last visit (to select who gets one).
- Not needed: home address, mobile number, date of birth, points. Leaving them out is the abstraction 抽象.

The voucher-email module in the worked example needs which of these items? Select すべて that apply.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Email to send to, date of last visit to choose who qualifies, and the ID to look the customer up. The postal address and birthday play no part in an email voucher, so an abstract model of this module leaves them out.
分解
- 分解とは、大きな問題をより小さな部分問題に分割し、それぞれを解きやすくすることである。
- 主要な部分を見つける → 各部分をサブタスクに分割する → 各部分がコード直接実装できるほど小さくなるまで続ける → 解き、統合する。
- 各部分問題はプログラムモジュールとなり、プロシージャーまたは関数となる。

プログラムをモジュールとサブモジュールに分解する

Decomposition means:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Decomposition splits a big task into smaller, separately-solvable sub-tasks.
Each sub-problem produced by decomposition becomes a program module: a procedure or a ____.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
The syllabus wording is exact: decomposition leads to the concept of a program module — a procedure or a 関数.
worked example: シネマ予約プログラム
- 複数のスクリーンを持つシネマは、顧客が座席を予約できるプログラムを必要としている。
- ShowFilms() は映画、スクリーン、開始時間を一覧表示する。
- ChooseSeats() は座席図を表示し、顧客の選択を受け取り、座席が空いているか確認する。
- TakePayment() は料金を計算し、クレジットカード決済を処理し、チケットを印刷する。
- 3つのモジュールがあり、それぞれが独立して設計、コーディング、テストできる大きさである。

Match each part of the cinema booking design to what it is.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Three modules, each doing one job, and a structure chart to show how they fit together.
なぜ分解するのか?3点満点の解答
- 各サブ問題は、単独で設計、コーディング、テストするのに十分な大きさである。
- 異なるプログラマが同時に異なるモジュールに作業できる。
- 既存のモジュールやライブラリルーチンは再利用可能であり、バグも一つのモジュール内にあるため見つけやすい。
- 分解図は構造チャート(トピック12)と呼ばれる。
四つの柱
- 分解: 問題を細分化する。パターン認識: 繰り返される要素を見つけて、一つの解決策を複数の部分に適用する。
- 抽象化: 重要でない詳細を排除する。アルゴリズム設計: 手順ごとの解決策を記述する。
- 実際にはこの順で用いられ、一度では終わらず繰り返し行う。
Solving a problem the computational way
Step through the four cornerstones in the order you'd use them — break the problem down, spot what repeats, strip it to essentials, then write the steps.
Match each cornerstone of computational thinking to what it means.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
The four cornerstones — decompose, spot patterns, abstract, then design the algorithm.
Put the computational-thinking steps in the order presented in the lesson.
難易度 3/5 · 200 コイン + 今日初回達成時の小ボーナス
Break it down, find what repeats, strip to essentials, then write the steps.
混同しないように
- 抽象化は「詳細を除去する」こと、分解は「問題を分割すること」である。「小さな部分に切り分ける」という表現は抽象化の説明ではない。
- 「説明せよ」への回答には方法を含め、単語一つではなく、何が、何に、そして各部分がどうなるかを具体的に記述する。
- 答えはシナリオに基づいて記述する。在庫システム、映画館、または店舗への言及がない分解答案では減点される。

In a "describe decomposition" question, an answer that never mentions the scenario (the shop, the cinema) can still earn full marks.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Mark schemes cap a generic answer: the recent stock-control question said "max 2 if no mention of stock control". Name the scenario's own modules and data.
理解できましたか
- 抽象化 = 本質を維持し、無関係な詳細を無視する → より単純なモデル
- 分解 = 大きな問題をサブ問題に分割する → 各部分は手続や関数となる
- 分解の利点: 設計・コーディング・テストを別々に行える、作業を分担できる、モジュールを再利用できる、バグを素早く発見できる
- 常にシナリオ固有のモジュールとデータを用いて記述する
何が問題でしたか?この内容はサイトの運営チームだけが確認します。