After a quick review of these: Some of them look like they would be good for a beginner - especially those which spell out the reasoning that went into building the code. I'm pretty sure it's the thought processes of the J programmer which Henry is after here.
Others would be more problematic for a beginner -- especially those where the beginner would have to define the words, to get the code to work. (Consider 'sep' for example, though there's plenty of other examples -- including those defined in a fashion which is consistent with verb definitions in addons.) Thanks, -- Raul On Wed, Aug 9, 2023 at 2:30 AM 'Skip Cave' via Programming <programm...@jsoftware.com> wrote: > > Henry, > > Over the last few years, I have been using math problems on Quora > <https://www.quora.com/> to polish my J skills. > I have solved probably a couple thousand solutions to math problems on > Quora using J. > Here is a small sample of some of my most recent Quora problem solutions. > Do you think these kinds of problems would be appropriate for helping > beginners learn J?: > > How many 5-digit numbers are there where each digit is greater or equal > than the previous one? > <https://www.quora.com/How-many-5-digit-numbers-are-there-where-each-digit-is-greater-or-equal-than-the-previous-one/answer/Ellis-Cave> > How do you prove that there is no 2-digit number such that the product of > its digits is greater than the number itself? > <https://www.quora.com/How-do-you-prove-that-there-is-no-2-digit-number-such-that-the-product-of-its-digits-is-greater-than-the-number-itself/answer/Ellis-Cave> > The sum of three numbers is 95. The third number is 4 times the second. The > first number is 5 more than the second. What are the numbers? > <https://www.quora.com/The-sum-of-three-numbers-is-95-The-third-number-is-4-times-the-second-The-first-number-is-5-more-than-the-second-What-are-the-numbers/answer/Ellis-Cave> > How do you find two positive numbers such that the sum of the squares of > the two numbers is 169 and the difference between the two numbers is 7? > <https://www.quora.com/How-do-you-find-two-positive-numbers-such-that-the-sum-of-the-squares-of-the-two-numbers-is-169-and-the-difference-between-the-two-numbers-is-7/answer/Ellis-Cave> > What are the square roots of numbers with two odd digits? > <https://www.quora.com/What-are-the-square-roots-of-numbers-with-two-odd-digits/answer/Ellis-Cave> > What is the smallest natural number that can be written as the sum of two > positive primes in more than one way? > <https://www.quora.com/What-is-the-smallest-natural-number-that-can-be-written-as-the-sum-of-two-positive-primes-in-more-than-one-way/answer/Ellis-Cave> > > The 1st, 2nd and 3rd perfect squares are 1, 36 and 64 in the following > arithmetic sequence: 1,8,15,22,29,36,43,50,57,64,71,…What is the 100th > perfect square of the sequence? > <https://www.quora.com/The-1st-2nd-and-3rd-perfect-squares-are-1-36-and-64-in-the-following-arithmetic-sequence-1-8-15-22-29-36-43-50-57-64-71-What-is-the-100th-perfect-square-of-the-sequence/answer/Ellis-Cave> > What number is it whose thousands digit is three times as large as the > hundreds digits, but two less than the tens digit, if the unit digit is 6, > no repetition of digits? > <https://www.quora.com/What-number-is-it-whose-thousands-digit-is-three-times-as-large-as-the-hundreds-digits-but-two-less-than-the-tens-digit-if-the-unit-digit-is-6-no-repetition-of-digits/answer/Ellis-Cave> > What is the solution of (2+√3) (2-√3)? > <https://www.quora.com/What-is-the-solution-of-2+%E2%88%9A3-2-%E2%88%9A3/answer/Ellis-Cave> > How do you find the sum of the digits of 2^1000? > <https://www.quora.com/How-do-you-find-the-sum-of-the-digits-of-2-1000/answer/Ellis-Cave> > If 10^5< K < 10^6, then what is the number of different values of K such > that the sum of digits of K is 2? > <https://www.quora.com/If-10-5-K-10-6-then-what-is-the-number-of-different-values-of-K-such-that-the-sum-of-digits-of-K-is-2/answer/Ellis-Cave> > Let a be the sum of digits of 5555^5555. Let b be the sum of digits of a. > Let c be the sum of digits of b. What is the value of c? > <https://www.quora.com/Let-a-be-the-sum-of-digits-of-5555-5555-Let-b-be-the-sum-of-digits-of-a-Let-c-be-the-sum-of-digits-of-b-What-is-the-value-of-c/answer/Ellis-Cave> > > A 5-digit number (in base 10) has digits k, k + 1, k + 2, 3k, k + 3 in that > order, fromleft to right. If this number is m2 for some natural number m, > what is the sum of the digits of m? > <https://www.quora.com/A-5-digit-number-in-base-10-has-digits-k-k-1-k-2-3k-k-3-in-that-order-from-left-to-right-If-this-number-is-m-2-for-some-natural-number-m-what-is-the-sum-of-the-digits-of-m/answer/Ellis-Cave> > How many positive integers less than 1,000 can be formed using the digits > 1,2,3,4,5 and 6 if no digit may be repeated? > <https://www.quora.com/How-many-positive-integers-less-than-1-000-can-be-formed-using-the-digits-1-2-3-4-5-and-6-if-no-digit-may-be-repeated/answer/Ellis-Cave> > If a 3-digit number is k times larger than its digits' sum, what is the > minimum value for k? > <https://www.quora.com/If-a-3-digit-number-is-k-times-larger-than-its-digits-sum-what-is-the-minimum-value-for-k/answer/Ellis-Cave> > How many numbers between 1000 and 3000 can be formed from the digits 1, 2, > 3,4,5? > <https://www.quora.com/How-many-numbers-between-1000-and-3000-can-be-formed-from-the-digits-1-2-3-4-5/answer/Ellis-Cave> > How many numbers between 1000-9999 are neither divisible by 3 or have a 3, > 6 or 9 in them? > <https://www.quora.com/How-many-numbers-between-1000-9999-are-neither-divisible-by-3-or-have-a-3-6-or-9-in-them/answer/Ellis-Cave> > How many different ways are there to select 4 numbers out of 1, 2, and 20 > given that the sum of those four numbers is divisible by 4? > <https://www.quora.com/How-many-different-ways-are-there-to-select-4-numbers-out-of-1-2-and-20-given-that-the-sum-of-those-four-numbers-is-divisible-by-4/answer/Ellis-Cave> > How many 5-digit numbers with all digits nonzero and no digit repeated are > divisible by 25? > <https://www.quora.com/How-many-5-digit-numbers-with-all-digits-nonzero-and-no-digit-repeated-are-divisible-by-25/answer/Ellis-Cave> > What is the last digit of a cube? > <https://www.quora.com/What-is-the-last-digit-of-a-cube/answer/Ellis-Cave> > > How many 4 digit numbers are divisible by 36, and those numbers are in the > format of 6_4_ with 6 and 4 needing to be in the places they are shown in > for all the multiples and the blank spaces can have any single digit number? > <https://www.quora.com/How-many-4-digit-numbers-are-divisible-by-36-and-those-numbers-are-in-the-format-of-6_4_-with-6-and-4-needing-to-be-in-the-places-they-are-shown-in-for-all-the-multiples-and-the-blank-spaces-can-have-any-single/answer/Ellis-Cave> > The average of 5 consecutive odd numbers is 25. What is the smallest of > these numbers? > <https://www.quora.com/The-average-of-5-consecutive-odd-numbers-is-25-What-is-the-smallest-of-these-numbers/answer/Ellis-Cave> > What is the sum of every odd number from one to twenty thousand? > <https://www.quora.com/What-is-the-sum-of-every-odd-number-from-one-to-twenty-thousand/answer/Ellis-Cave> > > A vendor bought 144 fruits and packed them in boxes. Some boxes contained > 12 fruits others contained 15 fruits. If there were more boxes containing > 12 fruits each than 15 fruits each, calculate the number of boxes each > containing 15 fruits? > <https://www.quora.com/A-vendor-bought-144-fruits-and-packed-them-in-boxes-Some-boxes-contained-12-fruits-others-contained-15-fruits-If-there-were-more-boxes-containing-12-fruits-each-than-15-fruits-each-calculate-the-number-of-boxes-each/answer/Ellis-Cave> > How many ten-digit numbers satisfy both conditions: I (Each of the numbers > 0 9, 8, 7, 6, 5, 4, 3, 2, 1, appears exactly once. ii) All numbers except 9 > are adjacent to a number greater than it.? > <https://www.quora.com/How-many-ten-digit-numbers-satisfy-both-conditions-I-Each-of-the-numbers-0-9-8-7-6-5-4-3-2-1-appears-exactly-once-ii-All-numbers-except-9-are-adjacent-to-a-number-greater-than-it/answer/Ellis-Cave> > How many prime factors does each number from 1 to 10 have? > <https://www.quora.com/How-many-prime-factors-does-each-number-from-1-to-10-have/answer/Ellis-Cave> > In how many ways can 3-digit odd numbers be formed from 5, 7, 3, 2, and 9? > <https://www.quora.com/In-how-many-ways-can-3-digit-odd-numbers-be-formed-from-5-7-3-2-and-9/answer/Ellis-Cave> > How many prime numbers up to a million end in a 7 in both base 10 and base > 12? > <https://www.quora.com/How-many-prime-numbers-up-to-a-million-end-in-a-7-in-both-base-10-and-base-12/answer/Ellis-Cave> > The average of 16 consecutive positive integers is 30.5. What is the > average of the first 8 integers of this set? > <https://www.quora.com/The-average-of-16-consecutive-positive-integers-is-30-5-What-is-the-average-of-the-first-8-integers-of-this-set/answer/Ellis-Cave> > What are all possible pairs of integers with a sum greater than or equal to > five but less than or equal to twenty-two? > <https://www.quora.com/What-are-all-possible-pairs-of-integers-with-a-sum-greater-than-or-equal-to-five-but-less-than-or-equal-to-twenty-two/answer/Ellis-Cave> > Find the smallest positive integer whose digits are all ones which is > divisible by 3333333? > <https://www.quora.com/Find-the-smallest-positive-integer-whose-digits-are-all-ones-which-is-divisible-by-3333333/answer/Ellis-Cave> > > The sum of the digits in the number 67 is 13. (1) How can we show that the > sum of the digits of the integers from 19 to 21 is 15 (2) how can we find > the sum of the digits of the integers from 1 to 99? > <https://www.quora.com/The-sum-of-the-digits-in-the-number-67-is-13-1-How-can-we-show-that-the-sum-of-the-digits-of-the-integers-from-19-to-21-is-15-2-how-can-we-find-the-sum-of-the-digits-of-the-integers-from-1-to-99/answer/Ellis-Cave> > What is the sum of all the even numbers between 75 and 85? > <https://www.quora.com/What-is-the-sum-of-all-the-even-numbers-between-75-and-85/answer/Ellis-Cave> > How many numbers from 1 to 1,000 are not divisible by 2, 3, 5 and 7? > <https://www.quora.com/How-many-numbers-from-1-to-1-000-are-not-divisible-by-2-3-5-and-7/answer/Ellis-Cave> > > The digits 1 to 9 are used exactly once each to make three 3-digit numbers. > The second number is three times the first number. The third number is five > times the first number. What is the second number? > <https://www.quora.com/The-digits-1-to-9-are-used-exactly-once-each-to-make-three-3-digit-numbers-The-second-number-is-three-times-the-first-number-The-third-number-is-five-times-the-first-number-What-is-the-second-number/answer/Ellis-Cave> > The unit of a two-digit number is 2 less than the tens digits. If the > number is decreased by 13 and then divided by the sum of the digits, the > result is 5. What is the number? > <https://www.quora.com/The-unit-of-a-two-digit-number-is-2-less-than-the-tens-digits-If-the-number-is-decreased-by-13-and-then-divided-by-the-sum-of-the-digits-the-result-is-5-What-is-the-number/answer/Ellis-Cave> > What is the number of integers between 101 and 199 which are exactly > divisible by 5 or 7? > <https://www.quora.com/What-is-the-number-of-integers-between-101-and-199-which-are-exactly-divisible-by-5-or-7/answer/Ellis-Cave> > How many integers (positive and negative) are divisors of 20? > <https://www.quora.com/How-many-integers-positive-and-negative-are-divisors-of-20/answer/Ellis-Cave> > What is a number which is of 4 digits and divisible by 3 but not by 9? > <https://www.quora.com/What-is-a-number-which-is-of-4-digits-and-divisible-by-3-but-not-by-9/answer/Ellis-Cave> > What is a five-digit number divisible by 2, 3, 4, and 9? > <https://www.quora.com/What-is-a-five-digit-number-divisible-by-2-3-4-and-9/answer/Ellis-Cave> > How many numbers between 1 and 1000 are divisible by 3 and 7 but not 2, 5 > or 11? > <https://www.quora.com/How-many-numbers-between-1-and-1000-are-divisible-by-3-and-7-but-not-2-5-or-11/answer/Ellis-Cave> > How many numbers from 100 to 10000 have EXACTLY 3 of the same digit? > <https://www.quora.com/How-many-numbers-from-100-to-10000-have-EXACTLY-3-of-the-same-digit/answer/Ellis-Cave> > Assume you have a 3 digit number, the last digit is twice as big as the > first digit.The product of all the digits is 14.what is the number? > <https://www.quora.com/Assume-you-have-a-3-digit-number-the-last-digit-is-twice-as-big-as-the-first-digit-The-product-of-all-the-digits-is-14-what-is-the-number/answer/Ellis-Cave> > How do I prove that 1+2–√+3–√+4–√+…100−−−√<676? > <https://www.quora.com/How-do-I-prove-that-1-sqrt-2-sqrt-3-sqrt-4-sqrt-100-676/answer/Ellis-Cave> > What are four irrational numbers between 3/4 and 4/5? > <https://www.quora.com/What-are-four-irrational-numbers-between-3-4-and-4-5/answer/Ellis-Cave> > For positive integer a, b, are there any satisfy 3 (a^2-ab+b^2) = 71(a+b)? > <https://www.quora.com/For-positive-integer-a-b-are-there-any-satisfy-3-a-2-ab-b-2-71-a-b/answer/Ellis-Cave> > How many numbers from 2000 to 2101 are divisible by 2 or by 3? > <https://www.quora.com/How-many-numbers-from-2000-to-2101-are-divisible-by-2-or-by-3/answer/Ellis-Cave> > > There are many hundreds more like these. > > Skip > > Skip Cave > Cave Consulting LLC > > > On Wed, May 31, 2023 at 10:01 AM Henry Rich <henryhr...@gmail.com> wrote: > > > How do you convince someone that J is really different? Examples seem > > contrived. > > > > I am trying something new. I have used J to solve a suite of > > programming problems posed by an impartial source, to wit Advent of Code > > 2022. Tire-kickers can compare the J solutions against those in other > > languages. > > > > The pages are at https://code.jsoftware.com/wiki/ShareMyScreen . > > > > IF YOU ARE NEW TO J, you are the person I need to hear from. Where do I > > need to add explanatory material, or rewrite a section? > > > > IF YOU ARE AN OLD J HAND, consider adding your own programs. They can > > be from any source as long as you make the solution comprehensible to a > > novice. > > > > I know several users on this list solved the AoC2022 problems; > > alternative solution pages would be welcome. > > > > Henry Rich > > > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm