본문 바로가기

While3

Deodorant Evaporator This program tests the life of an evaporator containing a gas. We know the content of the evaporator (content in ml), the percentage of foam or gas lost every day (evap_per_day) and the threshold (threshold) in percentage beyond which the evaporator is no longer useful. All numbers are strictly positive. The program reports the nth day (as an integer) on which the evaporator will be out of use. .. 2022. 8. 22.
Array.diff 문제 설명 Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result. It should remove all values from list a, which are present in list b keeping their order. array_diff([1,2],[1]) == [2] If a value is present in b, all of its occurrences must be removed from the other: array_diff([1,2,2,2,3],[2]) == [1,3] 해결 방법 1. b리스트 안의 요소가 a리스트 안에 .. 2022. 2. 13.
김왼손의 왼손코딩 #while _ while, continue, break 오늘 배운 것 두 가지 반복문 1. for > 횟수에 따른 반복 2. while > 조건에 따른 반복 반복문을 사용하면 코드를 최소화하여 값을 얻을 수 있음 while 조건: 실행할 명령1 실행할 명령2 > if와 구조는 동일 > 조건이 참이면 명령 실행 > 다시 돌아와 조건이 참이면 명령 실행 > 조건이 거짓이 될때까지 반복 강제중지 : 컨트롤 + C 반복문 안에서 사용하는 키워드 continue > 밑에 명령을 실행하지 않고 맨위로 올림 break > 반복을 종료 오늘 느낀 것 반복문은 자동화를 위해 자주 사용하게 될 것 같다. 자동화 하니까 지금 업무에서 적용가능한 자동화가 있을지 궁금하다. 구글시트로는 자동화하긴 하는데 그 외에 프로그램을 직접 만들어 업무의 효율을 높일 수 있으면 좋겠다. 파이썬.. 2021. 7. 21.