Omid - Challenge 319

data-challenges
advanced-exercises
🔰 Possible Result Challenge 319 : Random Generation!
Published

March 24, 2026

Illustration for Omid - Challenge 319

Challenge Description

🔰 Possible Result Challenge 319 : Random Generation!

Solutions

sample(10,6)
  • Logic:

    • Applies the workbook rule directly and returns the expected output shape
  • Strengths:

    • The R solution stays close to the workbook rule and keeps the transformation compact.
  • Areas for Improvement:

    • The code assumes the sheet structure and source ranges remain stable.
  • Gem:

    • The strongest part of the solution is choosing the right intermediate representation before shaping the final output.
import random
print(random.sample(range(1, 11), 6))
  • Logic:

    • Applies the workbook rule directly and returns the expected output shape
  • Strengths:

    • The Python version follows the same rule in a direct dataframe-oriented implementation.
  • Areas for Improvement:

    • The code assumes the workbook layout remains stable, so any sheet redesign would require small adjustments.
  • Gem:

    • The implementation stays close to the original workbook rule instead of adding unnecessary abstraction.

Difficulty Level

This task is moderate:

  • The business rule is readable, but the workbook still requires careful implementation to reach the expected layout.