Skills101
← Pseudocode & Output — Beginner

Pseudocode & Output Beginner — Test 2

15 questions19 minPass: 60%+20 XP on first pass

15 questions · 19 minutes · beginner level, with a worked solution for every question.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What will this pseudocode print?

    Integer n = 12320, r = 0
    while (n > 0)
        r = r * 10 + (n mod 10)
        n = n / 10      // integer division
    end while
    Print r
    
  2. Question 2

    What will be printed?

    Integer x = 5
    for (i = 1 to 3)
        x = (x * 3 + 1) mod 7
    end for
    Print x
    
  3. Question 3

    What will this pseudocode print?

    Integer s = 0
    for (i = 1 to 50)
        if (i mod 7 == 0)
            s = s + i
        end if
    end for
    Print s
    
  4. Question 4

    What will this pseudocode print?

    Integer n = 10471, s = 0
    while (n > 0)
        s = s + (n mod 10)
        n = n / 10      // integer division
    end while
    Print s
    
  5. Question 5

    What will this pseudocode print?

    Integer n = 81665, r = 0
    while (n > 0)
        r = r * 10 + (n mod 10)
        n = n / 10      // integer division
    end while
    Print r
    
  6. Question 6

    What will this pseudocode print?

    Integer s = 0
    for (i = 1 to 20)
        if (i mod 6 == 0)
            s = s + i
        end if
    end for
    Print s
    
  7. Question 7

    What will this pseudocode print?

    Integer n = 6631, s = 0
    while (n > 0)
        s = s + (n mod 10)
        n = n / 10      // integer division
    end while
    Print s
    
  8. Question 8

    What will be printed?

    Integer x = 6
    for (i = 1 to 4)
        x = (x * 3 + 1) mod 7
    end for
    Print x
    
  9. Question 9

    What will be printed?

    Integer x = 8
    for (i = 1 to 3)
        x = (x * 3 + 1) mod 10
    end for
    Print x
    
  10. Question 10

    What will this pseudocode print?

    Integer n = 49735, r = 0
    while (n > 0)
        r = r * 10 + (n mod 10)
        n = n / 10      // integer division
    end while
    Print r
    
  11. Question 11

    What will this pseudocode print?

    Integer s = 0
    for (i = 1 to 20)
        if (i mod 3 == 0)
            s = s + i
        end if
    end for
    Print s
    
  12. Question 12

    What will this pseudocode print?

    Integer s = 0
    for (i = 1 to 25)
        if (i mod 5 == 0)
            s = s + i
        end if
    end for
    Print s
    
  13. Question 13

    What will be printed?

    Integer x = 8
    for (i = 1 to 3)
        x = (x * 3 + 1) mod 11
    end for
    Print x
    
  14. Question 14

    What will this pseudocode print?

    Integer s = 0
    for (i = 1 to 30)
        if (i mod 4 == 0)
            s = s + i
        end if
    end for
    Print s
    
  15. Question 15

    What will this pseudocode print?

    Integer n = 45350, r = 0
    while (n > 0)
        r = r * 10 + (n mod 10)
        n = n / 10      // integer division
    end while
    Print r
    
🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →