Embercode
✕
Flowcharts and PseudocodeQuick quiz

Flowchart to code

6 questions. Covers One flowchart in three languages.

Questions 1 to 5 of 6

  1. 1. Match each flowchart step of the even counter to the Python line that carries it out.

    Choose the matching item for each row.

  2. 2. Match each language to the way it reads one whole number from the user.

    Choose the matching item for each row.

  3. 3. What does this program print? ``python def count_even(numbers): count = 0 for number in numbers: if number % 2 == 0: count = count + 1 return count print(count_even([3, -2, 5, 8, 6])) ``
  4. 4. A student writes this C++ loop. The input file holds 4, then 6, then the end of the file, with no 0. Why does the program never stop? ``cpp int count = 0; int number; std::cin >> number; while (number != 0) { if (number % 2 == 0) { count = count + 1; } std::cin >> number; } ``
  5. 5. In all three versions of the even counter, the line that carries out flowchart step 4 (is the number 0?) starts with the word ___.

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.