pop14 05. Flutter Navigator로 화면 이동하는 방법 오늘 배울 것오늘은 Flutter 에서 기본 제공하는 Navigator를 사용해 화면 간 이동 방법에 대해서 배워보겠습니다. 홈 → 입력 → 리스트 화면을 오가면서 Navigator 메서드(함수) push, pop, pushReplacement, popUntil 을 익혀봅시다. Navigator 메서드 요약표먼저 Navigator의 각 메서드에 대한 설명을 간략히 표로 정리하였습니다. 이를 바탕으로 실습을 진행하겠습니다.메서드설명뒤로가기사용 예push()새 화면 추가ONavigator.push(context, MaterialPageRoute(...))pop()현재 화면 제거-Navigator.pop(context)pushReplacement()현재 화면을 새로운 화면으로 교체❌Navigator.pus.. 2025. 5. 6. 0121. esreveR Write a function reverse which reverses a list (or in clojure's case, any list-like data structure) (the dedicated builtin(s) functionalities are deactivated) Solution: def reverse(lst): result = list() for _ in range(len(lst)): result.append(lst.pop()) return result 2023. 1. 21. 1018. Find the smallest integer in the array Given an array of integers your solution should find the smallest integer. For example: Given [34, 15, 88, 2] your solution will return 2 Given [34, -345, -1, 100] your solution will return -345 You can assume, for the purpose of this kata, that the supplied array will not be empty. Solution: # 1 def find_smallest_int(arr): return sorted(arr, reverse=True).pop() # 2 def find_smallest_int(arr): r.. 2022. 10. 18. 0915. Beginner - Reduce but Grow Given a non-empty array of integers, return the result of multiplying the values together in order. Example: [1, 2, 3, 4] => 1 * 2 * 3 * 4 = 24 Solution: def grow(arr, i=1): return grow(arr, i*arr.pop()) if arr else i 2022. 9. 15. 0906. The Coupon Code Story Your online store likes to give out coupons for special occasions. Some customers try to cheat the system by entering invalid codes or using expired coupons. Task Your mission: Write a function called checkCoupon which verifies that a coupon code is valid and not expired. A coupon is no more valid on the day AFTER the expiration date. All dates will be passed as strings in this format: "MO.. 2022. 9. 6. 0825. Find the first non-consecutive number Your task is to find the first element of an array that is not consecutive. By not consecutive we mean not exactly 1 larger than the previous element of the array. E.g. If we have an array [1,2,3,4,6,7,8] then 1 then 2 then 3 then 4 are all consecutive but 6 is not, so that's the first non-consecutive number. If the whole array is consecutive then return null2. The array will always have at leas.. 2022. 8. 25. 이전 1 2 3 다음