
4-26.配列

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
to prof
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
下の例のように、複数の数値や文字列などの値を格納する変数を配列という。
配列に含まれる一つひとつの値を(ア)といい、(ア)を指定するための番号を(イ)という。
例)
Omikuji = ["大吉", "中吉", "吉", "末吉", "凶"]
ア:要素、イ:キー
ア:要素、イ:添字
ア:バリュー、イ:キー
ア:バリュー、イ:添字
Answer explanation
配列を用いることで、一度に多くの連続したデータを扱うことができる。
問題文の例にある配列で、添字が 0 の要素は、文字列の「大吉」である。
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
次のプログラムを実行したとき、表示される結果として最も適当なものを 1 つ選びなさい。
※ 添字は 0 から始まるものとする
大吉
中吉
吉
末吉
Answer explanation
Omikuji[2] は、配列 Omikuji における添字が 2 の要素を意味する。
このプログラムでは、添字は 0 から始まることに注意する。
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
次のプログラムの実行結果が下記のようになるとき、空欄(ア)に入れるのに最も適当なものを 1 つ選びなさい。
【実行結果】
情報
表示する(Kamoku[3])
表示する(Kamoku[4])
表示する("Kamoku[3]")
表示する("Kamoku[4]")
Answer explanation
このプログラムでは添字は 0 から始まるため、「情報」を指定する添字は 3 になる。
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
次のプログラムを実行したとき、表示される結果として最も適当なものを 1 つ選びなさい。
※ 「表示する(配列名)」を実行すると、配列全体が表示されるものとする
["サクランボ", "イチゴ", "メロン", "ブドウ"]
["バナナ", "サクランボ", "メロン", "ブドウ"]
["バナナ", "イチゴ", "サクランボ", "ブドウ"]
["バナナ", "サクランボ", "イチゴ", "メロン", "ブドウ"]
Answer explanation
配列の添字を指定し、その要素に新しい値を代入することで、値を変更することができる。
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
次のプログラムの実行結果が下記のようになるとき、空欄(ア)に入れるのに最も適当なものを 1 つ選びなさい。
【実行結果】
["ピーマン", "ニンジン", "キャベツ", "トマト"]
Yasai[2] = キャベツ
Yasai[2] = "キャベツ"
Yasai[3] = キャベツ
Yasai[3] = "キャベツ"
Answer explanation
空欄(ア)には、添字が 2 の要素に新しい値を代入するプログラムが入る。
Similar Resources on Wayground
9 questions
1_システム開発

Quiz
•
9th - 12th Grade
8 questions
ネットワークのセキュリティ②

Quiz
•
9th - 12th Grade
10 questions
高校入試 歴史 経済の発展

Quiz
•
12th Grade
8 questions
4-24.変数

Quiz
•
9th - 12th Grade
7 questions
1範囲 情報の科学⑤

Quiz
•
10th Grade
6 questions
技術開発戦略の立案

Quiz
•
11th - 12th Grade
10 questions
5-36.Webページとメールの仕組み

Quiz
•
9th - 12th Grade
10 questions
ストラテジまとめ⑨

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade