Talk:Loops/Wrong ranges: Difference between revisions

 
(One intermediate revision by one other user not shown)
Line 13:
 
Following the Julia solution, I've just submitted an R solution that does not contain a loop. The task title makes me think that this is foul play, but I can't see anything in the task description that says that a loop must be used. Is this intentional? In other words, are the Julia and R solutions acceptable? --[[User:ReeceGoding|ReeceGoding]] ([[User talk:ReeceGoding|talk]]) 17:28, 22 June 2020 (UTC)
 
:No. Other than the title, there is no mention of loops anywhere in the task description. Sequences and loops are somewhat orthogonal anyway. If your language has some special syntax that is commonly used to generate sequences, then that is probably more interesting/useful than a slavish "do it with an explicit loop" example IMO. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 21:16, 22 June 2020 (UTC)
 
::Yep Thundergnat is correct. Although inspired by a loop, it is written to include sequence generators. The Python solution is such, and it may be better if languages use such given a choice. I guess I left it up to the example writer but didn't comment on this. Good to have it in the talk page now 👍. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 02:50, 24 June 2020 (UTC)
Anonymous user