728x90 반응형 SMALL programming383 chapter 5) Array methods and arrow functions ### Initial Array - The `numbers` array is initialized with integers from `0` to `9`. ### Operations Chain - **Filter**: `numbers.filter((value) => value % 2 === 0)` filters the array to include only even numbers. The condition `value % 2 === 0` evaluates to `true` for even numbers. The result of this operation is an array of even numbers: `[0, 2, 4, 6, 8]`. - **Map**: `.map((value) => value * v.. 2024. 4. 3. 백준) 6749번 - python a = int(input()) b = int(input()) print(b+(b-a) if b>a else a+(a-b)) 2024. 4. 3. 백준) 5717번 - python while True: m,f = map(int,input().split()) if m == 0 and f == 0: break else : print(m + f) 2024. 4. 2. 백준) 5596번 - python grade1, grade2 = list(map(int, input().split())), list(map(int, input().split())) print(sum(grade1) if sum(grade1) >= sum(grade2) else sum(grade2)) 2024. 4. 2. 이전 1 ··· 76 77 78 79 80 81 82 ··· 96 다음 728x90 반응형 LIST