Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.An algorithm has been written in pseudocode to check the temperature readings taken from a freezer are within the range -18 degrees to -25 degrees

1.An algorithm has been written in pseudocode to check the temperature readings taken from a freezer are within the range -18 degrees to -25 degrees inclusive. The algorithm counts the number of times that the temperature reading is below -25 degrees and the number of times that the temperature reading is above -18 degrees. An engineer is called if there are more than 10 temperature readings below -25 degrees. An alarm sounds if there are more than 5 temperature readings above -18 degrees. 01 TooHot 0 02 TooCold 1000 03 REPEAT 04 OUTPUT "Please enter temperature" 05 INPUT Temperature 06 IF Temperature < -25 07 THEN 08 TooCold TooCold - 1 09 ENDIF 10 IF Temperature > -18 11 THEN 12 TooHot TooHot + 1 13 ENDIF 14 UNTIL TooHot > 5 OR TooCold > 10 15 IF TooHot < 5 16 THEN 17 INPUT "Alarm!!" 18 ENDIF 19 IF TooCold > 10 20 THEN 21 OUTPUT "Call the Engineer" 22 ENDIF (a) Give the line number(s) from the algorithm of: an assignment statement ......................................................................................................... a loop ........................................................................................................................................ a counting statement ................................................................................................................ a selection statement

(b) Give line numbers where the four errors are to be found in the pseudocode. Suggest a correction for each error.

(c) Explain how you could extend the algorithm to count the number of times the temperature readings are within the range -18 degrees to -25 degrees inclusive.

2.A company selling CDs uses a unique 6-digit identification number for each CD title. The rightmost digit (position 1) is a check digit. For example, 6 3 5 0 4 6 3 1 2 4 1 9 check digit digit position identification number The validity of the number and check digit is calculated as follows: multiply each digit by its digit position add up the results of the multiplications divide the answer by 11 if the remainder is 0, the identification number and check digit are valid. (a) Show whether the following identification numbers are valid or not. You must show how you arrived at your answer. Identification number 1: 4 2 1 9 2 3 working:

(b) Find the check digit for this identification number. 5 0 2 4 1 __ working: check digit: [2] (c) Describe, with examples, two different types of data entry errors that a check digit would detect.

3.Kamil is setting up a new computer system to record television programmes. He wants to be able to record, view and then erase programmes that he does not want to keep. He has chosen to use DVD-RAM as an optical storage medium. Explain to Kamil why it is better to use DVD-RAM rather than DVD+RW or DVD-RW

4.An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers that are greater than or equal to 100. The number 999 is not output and stops the algorithm. INPUT Number WHILE Numbers <> 999 DO IF Number > 100 THEN OUTPUT Number ENDIF ENDWHILE OUTPUT Number (a) Identify the four errors in the pseudocode and suggest corrections.

(b)create a pseudocode statement to change the corrected algorithm to output all numbers between 100 and 200 inclusive. You do not need to rewrite the whole algorithm

5. The variables X, Y and Z are used to store data in a program: X stores a string Y stores a position in the string (e.g. 2) Z stores the number of characters in the string. (a) Write pseudocode statements to declare the variables X, Y and Z.

(b) The function Length(X) finds the length of a string X. The function SubString(X,Y,Z) finds a substring of X starting at position Y and Z characters long. The first character in X is in position 1. Write pseudocode statements to: store the string "Programming is fun" in X find the length of the string and output it extract the word fun from the string and output it

6.A computer has a Von Neumann architechure. (a) Circle three components that are part of the central processing unit (CPU) in this computer. accumulator (ACC) hard disk drive (HDD) memory address register (MAR) program counter (PC) random access memory (RAM) read only memory (ROM) sensor sold state drive (SSD) [3] (b) Describe the purpose of the control unit (CU) within this computer

(c) The computer has a single core CPU. (i) State one purpose of a core in a CPU. ........................................................................................................................................... ...................................................................................................................................... [1] (ii) The computer is upgraded to a dual core CPU. Explain how the upgrade can affect the performance of the computer

7.obots are used in a factory to build cars. (a) One characteristic of a robot is its mechanical structure. State two other characteristics of a robot. 1 ................................................................................................................................................ 2 ........................................................................................................................................... [2] (b) Suggest two advantages of using robots, instead of humans, to build cars in the factory

8.The Unicode character set is used to represent text that is typed into a computer. (a) Describe what is meant by a character set.

(b) One disadvantage of using the Unicode character set, instead of the ASCII character set, is that the text stored takes up more storage space. Give one reason why it takes up more storage space

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Programming questions