Question 1 of 3Difficulty ●●●●●
A running app uses this function to convert a distance:
FUNCTION ToMiles(Kilometres : REAL) RETURNS REAL RETURN Kilometres * 0.62ENDFUNCTIONWhich term describes Kilometres in the first line of the function?
GCSE Computer Science practice questions on subroutines, arrays and files. Try 3 for free below — with hints, the answer and why the wrong answers are tempting. GCSE Beast has 20 questions on this topic.
A running app uses this function to convert a distance:
FUNCTION ToMiles(Kilometres : REAL) RETURNS REAL RETURN Kilometres * 0.62ENDFUNCTIONWhich term describes Kilometres in the first line of the function?
Priya's quiz game has a procedure with the header PROCEDURE ShowLevel(Level : INTEGER). The procedure is written once, near the top of the program. Further down, a CALL ShowLevel statement appears in four different places, each with a different level number in the brackets.
Which statement is correct?
A game uses this pseudocode:
DECLARE Score : INTEGER PROCEDURE Bonus(Points : INTEGER) DECLARE Score : INTEGER Score ← Points * 2 OUTPUT ScoreENDPROCEDURE Score ← 5CALL Bonus(4)OUTPUT ScoreWhat is output?