
[ad_1]
Methods to enhance this puzzle?
The duty is to discover a end result, like a quantity from 1 to 10 from studying and understanding code. For instance:
end result = 0
for num in vary(0,11):
if sympy.isprime(num):
end result = num
break
print(end result)
I discovered that I wrestle with studying code, and devised this train to enhance it. In collaborating with a pc agent, the pc agent can generate puzzles with ideas that I’m attempting to study. Ideas like grid
, value to succeed in cell
, objective positions
was simple to grasp this fashion. Typically the code explicitly incorporates the reply, which is much less difficult, as a result of I do know what quantity I’m in search of. Realizing the vary of attainable values for the reply, growing the issue of the puzzles and dealing with ideas that I’m attempting to study appears to work.
Different examples:
end result = checklist(calendar.month_name).index("August")
right this moment = datetime.date.right this moment()
end result = right this moment.day
end result = sympy.isprime(7) + sympy.isprime(9)
I ponder tips on how to, for instance, change the vary of integers meaningfully. Maybe to attach it with studying mathematical ideas, like fractions, combinatorics, likelihood. Methods to weave these values to search out into the code? Are there related, present puzzles to look into, or strategies to study to enhance puzzles?
[ad_2]