Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A teacher finds this algorithm in an old program. Which sentence best states what it does?
Computer Science
Medium
High School (9–10)
Algorithms, Programming and Logic › Algorithms and Problem-Solving
IGCSE
Created by
StemPy Lab
A teacher finds this algorithm in an old program. Which sentence best states what it does?
Below ← 0 FOR Index ← 1 TO 10 INPUT Number IF Number < 0 THEN Below ← Below + 1 ENDIF NEXT Index OUTPUT Below
It inputs ten numbers and outputs how many are zero or less
It inputs ten numbers and outputs how many of them are less than zero
It inputs ten numbers and outputs the total of the negative ones
It inputs numbers until a negative one and outputs how many came before it
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← The flowchart sets Value to 1 and Count to 0. It then multiplies Value by 3 and adds 1 to Count, and repeats these two steps until the decision Value > 50? is Yes. It then outputs Count and Value. The diagram shows these steps. What is output?
The flowchart inputs Mark. The first decision is Mark >= 50?, and its No exit outputs "Fail". Its Yes exit leads to a second decision Mark >= 80?, whose Yes exit outputs "Merit" and whose No exit outputs "Pass". The diagram shows this. Which input gives the output "Pass"? →
More on
Algorithms, Programming and Logic › Algorithms and Problem-Solving
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
This is the kind of long scenario question that ends Paper 2…
Hard
A delivery company adds a check digit to each parcel number…
Medium
Name the check in each case. Say whether it is validation or verification…
Easy
A bubble sort is changed so that it sorts in descending order: the comparison becomes IF…
Hard
All problems on this topic →