Photo AI

OCR High School uses a computer system to store data about students' conduct - OCR - GCSE Computer Science - Question 1 - 2018 - Paper 1

Question icon

Question 1

OCR-High-School-uses-a-computer-system-to-store-data-about-students'-conduct-OCR-GCSE Computer Science-Question 1-2018-Paper 1.png

OCR High School uses a computer system to store data about students' conduct. The system records good conduct as a positive number and poor conduct as a negative num... show full transcript

Worked Solution & Example Answer:OCR High School uses a computer system to store data about students' conduct - OCR - GCSE Computer Science - Question 1 - 2018 - Paper 1

Step 1

State the most appropriate data type used to store each of the following items of data. * StudentName

96%

114 rated

Answer

The most appropriate data type for StudentName is a String, as it is used to store textual information.

Step 2

* Points

99%

104 rated

Answer

The most appropriate data type for Points is Integer or Real, as it needs to store numeric values which can be positive or negative.

Step 3

* LetterSent

96%

101 rated

Answer

The most appropriate data type for LetterSent is Boolean, as it only needs to represent two states: TRUE (sent) or FALSE (not sent).

Step 4

The data shown above in Fig. 1 is stored in a database table called Conduct.

98%

120 rated

Answer

To store the data shown, the SQL query can read from the database as follows:

SELECT StudentName
FROM Conduct
WHERE Points < 0;

Step 5

Write an algorithm that will identify whether the data in the studentdata array shows that a letter has been sent home or not for the student.

97%

117 rated

Answer

Here is a simple algorithm to determine if the letter was sent:

if studentdata[3] == "TRUE" then
    print "sent"
else
    print "not sent"

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;