Junior Secondary · Computer Literacy / Information & Communication Technology

Data manipulation:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 5 問。すべて「Data manipulation」からの出題です。

10 問27 無料・登録不要
問 1
1

In a programming environment, which of the following relational operators is used to check if two values are NOT equal to each other?

問 2
1

Consider the following logical expression used in a program flow control:
(score >= 50) AND (score < 80)
If the variable score is exactly 50, what is the boolean result of this expression?

問 3
1

A loop is designed to simulate rolling a standard 6-sided die until a \( 6 \) is rolled. If the random number generator function random(1, 6) is used, which logical condition should be placed in a WHILE loop to ensure it continues as long as the result is not \( 6 \)?

問 4
1

A program uses three variables: A = 12, B = 5, and C = 2. What is the final value of variable result after executing the following operations in order?

1. result = A + B * C
2. result = result - (A / C)

問 5
1

To create an arithmetic quiz, a program generates two random integers \( a \) and \( b \) between \( 1 \) and \( 10 \). It then asks the user for the answer to \( a \times b \). Which of the following relational operators is most appropriate to check if the user's input ans is correct?

問 6
3

In a programming environment, what is the resulting boolean value of the logical expression (5 > 3) AND (10 < 7)? Briefly explain your answer.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 7
6

Consider a program that evaluates a student's grade. If a student needs a score of at least 50 to pass and less than 50 to fail, which two relational operators should be used to represent these two conditions respectively? Describe how these operators help the program decide the output.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 8
3

Suppose a program uses a variable score initially set to 10. If the command score = score * 2 + 5 is executed, what is the new value of score? Show the calculation.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 9
4

A student is writing a simple program to calculate the average score of a class. The program uses a loop to accept the scores of 5 students from the keyboard and then calculates the result.

(a) Identify the relational operator that would be used in a loop condition to ensure it runs exactly 5 times if the counter starts at 1.
(b) If the five scores entered are 80, 70, 90, 60, and 100, what is the final value of the variable used to store the sum of scores?
(c) The student wants to display a message "Pass" if the average is 50 or above, and "Fail" otherwise. Name the logical operator or flow control statement needed to implement this decision.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 10
6

Consider the following pseudocode for a program designed to manipulate text strings and numbers:

SET total = 0
FOR count = 1 TO 3
  INPUT num
  IF num > 10 AND num < 20 THEN
    SET total = total + num
  END IF
NEXT count
PRINT "Final result: " + total

(a) Identify the logical operator used in the code and explain its function in this specific context.
(b) If the user inputs the values 15, 5, and 12, calculate the final value of the variable total.
(c) How does the program use input and output features to interact with the user?
(d) Suggest one text string manipulation effect that could be added to the output to make the result more visually interesting for the user.

まず自分で答えを書いてから、解説と照らし合わせましょう。

※ thinkaのコンテンツはAIにより生成されているため、内容が正確でない場合があります。補助教材としてご使用いただき、公式の教材と合わせてご確認ください。

模範解答は見ました。次はあなたの答案を採点します。

このページは良い答案の形を示せますが、あなたの答案に何が足りないかは教えられません。thinka は実際の採点基準に沿って記述答案を約 15 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める