프로그래밍 공부131 5. *Python, CheckiO Elementary_End Zeros Try to find out how many zeros a given number has at the end. Input: A positive Int Output: An Int. Example: end_zeros(0) == 1 end_zeros(1) == 0 end_zeros(10) == 1 end_zeros(101) == 0 ->Solve it 지정된 숫자의 끝에 0이 몇 개 있는지 알아보세요. 입력: 양수 입력 출력: Int. def end_zeros(num: int) -> int: return len(str(num)) - len(str(num).rstrip('0')) -> end_zeros(101) == 0 이 상태는 현재 len(str(101)) = 3 ....(1) - len(str(num))... 2020. 10. 22. 4. Python, CheckiO Elementary_Number Length You have a positive integer. Try to find out how many digits it has? Input: A positive Int Output: An Int. Example: number_length(10) == 2 number_length(0) == 1 1 2 -> Solve it def number_length(a: int) -> int: return len(str(a)) # len은 자릿수의 개수를 알려주는 함수이다. if __name__ == '__main__': print("Example:") print(number_length(10)) # These "asserts" are used for self-checking and not for an auto-testin.. 2020. 10. 22. 3. Python, CheckiO Elementary_Acceptable Password I Elementary English RU JA You are at the beginning of a password series. Every mission is based on the previous one. Going forward the missions will become slightly more complex. In this mission, you need to create a password verification function. The verification condition is: the length should be bigger than 6. -> 길이가 6보다 크면 = Ture -> 그렇지 않으면, False Input: A string. Output: A bool. Example: is.. 2020. 10. 22. 2. *Python, CheckiO Elementary_First Word (simplified) You are given a string and you have to find its first word. This is a simplified version of the First Word mission, which can be solved later. The input string consists of only English letters and spaces. There aren’t any spaces at the beginning and the end of the string. Input: A string. Output: A string. Example: first_word("Hello world") == "Hello" 1 How it is used: The first word is a comman.. 2020. 10. 22. 이전 1 ··· 29 30 31 32 33 다음