Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)

Data types and structures:练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「Data types and structures」。

10 道题目24 免费,无需注册
第 1 题
1

Which of these is a primitive data type used to store a single keyboard character such as 'A' or '?'?

第 2 题
1

What would be the result of a substring operation on the string "ComputerScience" if the parameters were substring(4, 3) (using 0-based indexing where 4 is the start index and 3 is the length)?

第 3 题
1

A programmer needs to store data about a book, including its Title (String), Price (Real), and IsAvailable (Boolean). Which data structure allows these different data types to be stored together as a single entity?

第 4 题
1

Which of the following is considered a primitive data type used in programming?

第 5 题
1

A programmer needs to store a collection of 50 student names. Which data structure is most appropriate for storing this data under a single identifier?

第 6 题
2

State the most appropriate primitive data type for storing whether a user has agreed to the terms and conditions of a website.

先自己写一遍答案,再对照解题步骤。

第 7 题
3

A program needs to store the names of 30 students in a class. Identify the most efficient data structure to use and state its dimension.

先自己写一遍答案,再对照解题步骤。

第 8 题
6

Given a string variable \( S = "Edexcel" \), determine the result of a substring operation that extracts 4 characters starting from index 2.

先自己写一遍答案,再对照解题步骤。

第 9 题
3

A programmer is writing a script to calculate the area of a circle. The user needs to provide the radius as a decimal number.

(a) Identify the most appropriate data type for the variable radius.
(b) Write a line of code that takes a user's input and stores it as this data type.

先自己写一遍答案,再对照解题步骤。

第 10 题
5

An array named scores contains the following values: [45, 67, 12, 89, 34].

(a) State the 0-based index of the value 12.
(b) Write a pseudocode loop that iterates through every item in this array and outputs only scores greater than 50.
(c) Identify the data structure used for scores and state if it is static or dynamic in typical implementation.

先自己写一遍答案,再对照解题步骤。

* thinka提供的内容由AI生成,可能并非总是准确或最新。请将其用作辅助资源,并与官方材料进行核实。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习