Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Even-or-odd/AppleScript/even-or-odd-1.applescript
Normal file
14
Task/Even-or-odd/AppleScript/even-or-odd-1.applescript
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
set L to {3, 2, 1, 0, -1, -2, -3}
|
||||
|
||||
set evens to {}
|
||||
set odds to {}
|
||||
|
||||
repeat with x in L
|
||||
if (x mod 2 = 0) then
|
||||
set the end of evens to x's contents
|
||||
else
|
||||
set the end of odds to x's contents
|
||||
end if
|
||||
end repeat
|
||||
|
||||
return {even:evens, odd:odds}
|
||||
Loading…
Add table
Add a link
Reference in a new issue