Input-Output (Basic) - Advanced Level: tricky variations ADVANCED

Level up your input-output (basic) skills with this challenging mix. 20 advanced-level problems await in Worksheet 24 of 30. Focus area: tricky variations. Learn problem solving, practice tests, exam preparation through systematic practice. Designed for advanced learners seeking complex scenarios and multi-step problems.

📝 Worksheet 24 of 30 • 20 questions • ⏱️ Estimated time: 20 minutes • 🎯 Advanced level

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

Question 1

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

Question 2

Input: zebra fish lion horse tiger Step 1: fish zebra lion horse tiger Step 2: fish lion zebra horse tiger Step 3: fish lion horse zebra tiger What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. zebra fish lion horse tiger → fish horse lion tiger zebra

Question 3

Input: 56 18 43 57 68 41 76 46 Step 1: Identify prime numbers: 41 43 Step 2: Identify composite numbers: 18 46 56 57 68 76 Step 3: Combine (primes first, then composites, each sorted ascending): 41 43 18 46 56 57 68 76 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 41 43 18 46 56 57 68 76

Question 4

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

Question 5

Input: 85 52 30 90 95 26 Step 1: Calculate digit sums → 85(13) 52(7) 30(3) 90(9) 95(14) 26(8) Step 2: Sort by digit sum (ascending) → 30 52 26 90 85 95 What is the final sorted output?
Numbers sorted by sum of their digits (smallest sum first). If sums are equal, numbers sorted by value: 30 52 26 90 85 95

Question 6

Input: fish goat cat horse zebra Step 1: fish cat goat horse zebra Step 2: cat fish goat horse zebra What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. fish goat cat horse zebra → cat fish goat horse zebra

Question 7

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

Question 8

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

Question 9

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

Question 10

Input: 5 44 fig grape 56 elderberry Step 1: Sorted words → elderberry fig grape Step 2: Sorted numbers → 5 44 56 Step 3: Interleave (word, number, word, number...) → elderberry 5 fig 44 grape 56 What is the final output?
Words sorted alphabetically, numbers sorted ascending, then interleaved in pattern: word, number, word, number... → elderberry 5 fig 44 grape 56

Question 11

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

Question 12

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

Question 13

Input: 12 67 planet 89 comet asteroid Step 1: Separate & sort words → asteroid comet planet Step 2: Separate & sort numbers → 12 67 89 Step 3: Alternate (word, number, word, number...) → asteroid 12 comet 67 planet 89 What is the final arrangement?
Words sorted alphabetically, numbers sorted ascending, then placed alternately starting with a word: asteroid 12 comet 67 planet 89

Question 14

Input: coding noon world radar python 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 15

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

Question 16

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

Question 17

Input: 75 52 11 13 73 98 62 46 Step 1: Identify prime numbers: 11 13 73 Step 2: Identify composite numbers: 46 52 62 75 98 Step 3: Combine (primes first, then composites, each sorted ascending): 11 13 73 46 52 62 75 98 What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 11 13 73 46 52 62 75 98

Question 18

Input: 67 moon planet 23 galaxy 78 Step 1: Separate & sort words → galaxy moon planet Step 2: Separate & sort numbers → 23 67 78 Step 3: Alternate (word, number, word, number...) → galaxy 23 moon 67 planet 78 What is the final arrangement?
Words sorted alphabetically, numbers sorted ascending, then placed alternately starting with a word: galaxy 23 moon 67 planet 78

Question 19

Input: 88 75 60 42 99 37 59 47 Step 1: Even numbers (sorted): 42 60 88 Step 2: Odd numbers (sorted): 37 47 59 75 99 Step 3: Combine (evens then odds): 42 60 88 37 47 59 75 99 What is the final output?
Even numbers first (sorted ascending), then odd numbers (sorted ascending): 42 60 88 37 47 59 75 99

Question 20

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