Difference: CSC121F2025Lab07Hint02 ( vs. 1)

Revision 12025-08-04 - CathyBareiss

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CSC121F2025Lab07"

Creating the random solution

  • Start with a blank string.
  • For the number of pegs:
    • pick a random number between 0 and one less than the number of colors
    • concatenate that digit (integer) to the string
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback