Input-Output (Basic) - Beginner-Intermediate Level: exam-oriented practice BEGINNER-INTERMEDIATE

Strategic fast track practice for input-output (basic): 20 beginner-intermediate-level problems. Worksheet 9 of 30 - Focus: exam-oriented practice. Develop expertise in logical thinking, problem solving, practice tests with step-by-step solutions. Ideal for developing learners targeting building on fundamentals with moderate challenges.

📝 Worksheet 9 of 30 • 20 questions • ⏱️ Estimated time: 20 minutes • 🎯 Beginner-intermediate level

What you'll learn in this worksheet:
Your progress through Input-Output (Basic)
Worksheet 9 of 30 (30% complete)

Question 1

Input: butterfly hippopotamus ox rat ant Step 1: ox Step 2: ox ant rat Rule: Arrange words by length (shortest first), then alphabetically for same length. What is the final output?
Sorted by word length: ox ant rat butterfly hippopotamus

Question 2

Input: bat bee hippopotamus elephant butterfly Step 1: bat bee Step 2: bat bee elephant Rule: Arrange words by length (shortest first), then alphabetically for same length. What is the final output?
Sorted by word length: bat bee elephant butterfly hippopotamus

Question 3

Input: 24 38 47 23 37 50 Step 1: Calculate digit sums → 24(6) 38(11) 47(11) 23(5) 37(10) 50(5) Step 2: Sort by digit sum (ascending) → 23 50 24 37 38 47 What is the final sorted output?
Numbers sorted by sum of their digits (smallest sum first). If sums are equal, numbers sorted by value: 23 50 24 37 38 47

Question 4

Input: 62 41 24 47 37 93 Step 1: 24 41 62 47 37 93 Step 2: 24 37 62 47 41 93 Step 3: 24 37 41 47 62 93 What is the final sorted output in ascending order?
Numbers are arranged in ascending order (smallest to largest): 24 37 41 47 62 93

Question 5

Input: CODE Step 1: Reverse the word → EDOC Step 2: Shift each letter +1 (A→B, B→C, ..., Z→A) → FEPD Step 3: Rotate left by 2 positions → PDFE Step 4: For even positions (0-indexed), keep letter; for odd positions, replace with position number (A=1, B=2...) → P4F5 What is the final output?
Multiple transformations applied sequentially: CODE → EDOC → FEPD → PDFE → P4F5

Question 6

Input: 73 earth 91 sun 15 mercury Step 1: Separate → Words: earth sun mercury, Numbers: 73 91 15 Step 2: Sort numbers ascending → 15 73 91 Step 3: Sort words by length (then alphabetically) → sun earth mercury Step 4: Alternate (word, number, word, number...) → sun 15 earth 73 mercury 91 What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: sun 15 earth 73 mercury 91

Question 7

Input: ball ice ant cat goat Step 1: Identify vowel-starting words: ant ice Step 2: Identify consonant-starting words: ball cat goat Step 3: Sort each group alphabetically Step 4: Combine (vowels first, then consonants): ant ice ball cat goat What is the final output?
Words starting with vowels come first (sorted alphabetically), followed by words starting with consonants (sorted alphabetically): ant ice ball cat goat

Question 8

Input: grape 23 12 78 fig banana cherry 5 Step 1: Sorted words → banana cherry fig grape Step 2: Sorted numbers → 5 12 23 78 Step 3: Interleave (2 words, 1 number, repeat) → banana cherry 5 fig grape 12 23 78 What is the final output?
Words sorted alphabetically, numbers sorted ascending, then interleaved in pattern: 2 words, 1 number, repeat → banana cherry 5 fig grape 12 23 78

Question 9

Input: noon world python racecar hello Step 1: Palindromic words (read same forwards/backwards): noon racecar Step 2: Non-palindromic words: hello python world Step 3: Combine (palindromes first, then others, each sorted alphabetically): noon racecar hello python world What is the final output?
Palindromic words first (alphabetically sorted), then non-palindromic words (alphabetically sorted): noon racecar hello python world

Question 10

Input: 60 71 43 85 42 84 64 90 Step 1: Even numbers (sorted): 42 60 64 84 90 Step 2: Odd numbers (sorted): 43 71 85 Step 3: Combine (evens then odds): 42 60 64 84 90 43 71 85 What is the final output?
Even numbers first (sorted ascending), then odd numbers (sorted ascending): 42 60 64 84 90 43 71 85

Question 11

Input: hello civic python radar world Step 1: Palindromic words (read same forwards/backwards): civic radar Step 2: Non-palindromic words: hello python world Step 3: Combine (palindromes first, then others, each sorted alphabetically): civic radar hello python world What is the final output?
Palindromic words first (alphabetically sorted), then non-palindromic words (alphabetically sorted): civic radar hello python world

Question 12

Input: 67 mars 34 56 jupiter neptune Step 1: Separate → Words: mars jupiter neptune, Numbers: 67 34 56 Step 2: Sort numbers ascending → 34 56 67 Step 3: Sort words by length (then alphabetically) → mars jupiter neptune Step 4: Alternate (word, number, word, number...) → mars 34 jupiter 56 neptune 67 What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: mars 34 jupiter 56 neptune 67

Question 13

Input: 30 23 17 10 93 8 44 61 Step 1: Identify prime numbers: 17 23 61 Step 2: Identify composite numbers: 8 10 30 44 93 Step 3: Combine (primes first, then composites, each sorted ascending): 17 23 61 8 10 30 44 93 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 17 23 61 8 10 30 44 93

Question 14

Input: 64 50 56 76 83 68 Step 1: Calculate digit sums → 64(10) 50(5) 56(11) 76(13) 83(11) 68(14) Step 2: Sort by digit sum (ascending) → 50 64 56 83 76 68 What is the final sorted output?
Numbers sorted by sum of their digits (smallest sum first). If sums are equal, numbers sorted by value: 50 64 56 83 76 68

Question 15

Input: ball dog umbrella cat ice Step 1: Identify vowel-starting words: ice umbrella Step 2: Identify consonant-starting words: ball cat dog Step 3: Sort each group alphabetically Step 4: Combine (vowels first, then consonants): ice umbrella ball cat dog What is the final output?
Words starting with vowels come first (sorted alphabetically), followed by words starting with consonants (sorted alphabetically): ice umbrella ball cat dog

Question 16

Input: mercury 42 73 saturn venus 56 Step 1: Separate → Words: mercury saturn venus, Numbers: 42 73 56 Step 2: Sort numbers ascending → 42 56 73 Step 3: Sort words by length (then alphabetically) → venus saturn mercury Step 4: Alternate (word, number, word, number...) → venus 42 saturn 56 mercury 73 What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: venus 42 saturn 56 mercury 73

Question 17

Input: python radar world coding noon Step 1: Palindromic words (read same forwards/backwards): noon radar Step 2: Non-palindromic words: coding python world Step 3: Combine (palindromes first, then others, each sorted alphabetically): noon radar coding python world What is the final output?
Palindromic words first (alphabetically sorted), then non-palindromic words (alphabetically sorted): noon radar coding python world

Question 18

Input: 77 97 37 99 72 11 21 9 Step 1: Even numbers (sorted): 72 Step 2: Odd numbers (sorted): 9 11 21 37 77 97 99 Step 3: Combine (evens then odds): 72 9 11 21 37 77 97 99 What is the final output?
Even numbers first (sorted ascending), then odd numbers (sorted ascending): 72 9 11 21 37 77 97 99

Question 19

Input: 24 41 6 23 37 94 49 17 Step 1: Identify prime numbers: 17 23 37 41 Step 2: Identify composite numbers: 6 24 49 94 Step 3: Combine (primes first, then composites, each sorted ascending): 17 23 37 41 6 24 49 94 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 17 23 37 41 6 24 49 94

Question 20

Input: neptune 34 42 venus 15 sun Step 1: Separate → Words: neptune venus sun, Numbers: 34 42 15 Step 2: Sort numbers ascending → 15 34 42 Step 3: Sort words by length (then alphabetically) → sun venus neptune Step 4: Alternate (word, number, word, number...) → sun 15 venus 34 neptune 42 What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: sun 15 venus 34 neptune 42
Previous Worksheet Next Worksheet