Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rosetta Code Challenges
#11
@MasterGy

When checking over your code, I could not figure out this part:
Code: (Select All)
For t2 = 1 To 12
    add = add + Abs(ans(t2) = quest(t2))
    count = count + 1
Next t2

If add + 1 = count Then  '??? <<< add = count for perfect match with ans() to 12 statements
    Print "find:  ";:
    For t3 = 1 To 12 Step 1
        If ans(t3) Then Print t3;
    Next t3
    Print
End If
Shouldn't add = 12 (=count) for a perfect match with your ans() from binary conversion of numbers 0 to 4095.
If add + 1 = 12 you are allowing near misses which gets you extra credit at RC but you really want to see and mark the solution.

Also how you handled statement 4 and 8 is very different than mine and I don't even know or want to try equivalent of 2 And's between 3 ans().

' 4.  If statement 5 is true, then statements 6 and 7 are both true. 
Code: (Select All)
Case 4: ans = ans(5) And ans(6) And ans(7)
b = b + ...
Reply


Messages In This Thread
Rosetta Code Challenges - by bplus - 04-26-2022, 09:17 PM
RE: Rosetta Code Challenges - by SierraKen - 04-27-2022, 04:36 AM
RE: Rosetta Code Challenges - by bplus - 04-27-2022, 01:38 PM
RE: Rosetta Code Challenges - by bplus - 10-30-2022, 04:41 AM
RE: Rosetta Code Challenges - by bplus - 10-31-2022, 05:40 PM
RE: Rosetta Code Challenges - by SpriggsySpriggs - 10-31-2022, 07:24 PM
RE: Rosetta Code Challenges - by bplus - 10-31-2022, 09:09 PM
RE: Rosetta Code Challenges - by MasterGy - 10-31-2022, 09:33 PM
RE: Rosetta Code Challenges - by bplus - 10-31-2022, 09:43 PM
RE: Rosetta Code Challenges - by bplus - 11-01-2022, 02:07 AM
RE: Rosetta Code Challenges - by bplus - 11-01-2022, 12:19 PM
RE: Rosetta Code Challenges - by bplus - 11-05-2022, 04:57 AM
RE: Rosetta Code Challenges - by CharlieJV - 11-05-2022, 03:10 PM
RE: Rosetta Code Challenges - by bplus - 11-05-2022, 04:02 PM
RE: Rosetta Code Challenges - by bplus - 09-10-2023, 02:40 PM
RE: Rosetta Code Challenges - by bplus - 04-29-2024, 03:03 AM



Users browsing this thread: 1 Guest(s)