subject

2. The following is a function: FUNCTION findmax(score)
length <- len(score)
maxvalue <- score[0]
FOR n <- 1 TO length - 1
IF score[n] > maxvalue
maxvalue <- score[n]
ENDIF
ENDFOR
RETURN maxvalue
ENDFUNCTION

(a) Write a statement to use this function to find the maximum value in an array NumberOfViewers

(b) Give the name of a parameter used by this function.

(c) Identify a local variable

(d) State the data type of score.

(e) Give an example from this function of
(i) an assignment statement [1]

(ii) iteration

(iii) selection

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 01:30, jadaroyval
Write a program that asks the user to enter the name of an input file. if the file does not exist, the program should prompt the user to enter the file name again. if the user types quit in any uppercase/lowercase combinations, then the program should exit without any further output.
Answers: 3
image
Computers and Technology, 25.06.2019 01:00, mrstealyogirl40
Holly created a professional development plan to explore how she could advance from her entry-level position to the next step in her career. she has identified her current skills and the skills needed for the job she wants. what should she do now? a) ask a colleague for advice about work-life balance b) identify her areas for improvement c) plan a vacation before she begins her new job d) wait until a position opens before continuing her plan
Answers: 1
image
Computers and Technology, 25.06.2019 08:20, xxaurorabluexx
Which of the following statements is true of offshore outsourcing? a. improved telecommunication systems have increased its attractiveness. b. the limited availability of the internet has reduced its effectiveness. c. reduced bandwidth has increased its efficiency to perform with low latency. d. the increased cost of communication has reduced its popularity.
Answers: 1
image
Computers and Technology, 25.06.2019 10:30, jahnoibenjamin
Which of the following if statements uses a boolean condition to test: "if the item is on sale, you can buy it"? a: if( onsale < = "yes" ): b: if( onsale > = "yes" ): c: if( onsale == "yes" ): d: if( onsale ! = "yes" ):
Answers: 2
You know the right answer?
2. The following is a function: FUNCTION findmax(score)
length <- len(score)
maxvalu...

Questions in other subjects:

Konu
Mathematics, 16.07.2019 08:30