コンテンツへスキップ

Refine designs and choose test data

文を書く前に精密化する

最大間隔レポートの場合、read data → gaps計算 → 最大gap特定 → 出力の順で始める。gaps計算を refinement して、Iが2からNumberOfReadingsまで変化する際、インデックスIとI - 1を比較する。これにより下界より前に読み込むことを避ける。

レポートはread data、gaps計算、最大gap特定、出力に分けられ、gaps計算は2からNumberOfReadingsまでのループに细化され、各読み取り値を次の値から差し引く

Explain your choice of data structure and loop. Identify one boundary case and predict its result. For a subroutine, explain what is returned or changed in the caller.

このブラウザでの今回のセッションに保存されました。ご自身または教師で確認してください。これらの説明は自動採点されません。

これらの基準に基づいて説明内容を確認する
  • My types and data structure match the data and the question.
  • I justified the loop and checked its first and last iterations.
  • Initial values and rejected operations preserve the intended state.
  • My test includes input, purpose and expected result.
  • I distinguished returning a value from printing and changing caller state.

ログインまたはアカウント作成

IGCSE, A-Level & AP