본문 바로가기
728x90

분류 전체보기324

[CheckIO/Electronic Station] Acceptable Password V 1. Problem: https://py.checkio.org/en/mission/acceptable-password-v/ 2. My solution def is_acceptable_password(password: str) -> bool: # your code here if len(password) 9: return True else: list_boolen = [ x.isnumeric() for x in list(password)] if True in list_boolen : if False in list_boolen: return True re.. 2024. 4. 7.
[CheckIO/Electronic Station] Acceptable Password IV 1. Problem: https://py.checkio.org/en/mission/acceptable-password-iv/ 2. My solution def is_acceptable_password(password: str) -> bool: # your code here if len(password) 9: return True else: list_boolen = [ x.isnumeric() for x in list(password)] if True in list_boolen : if False in list_boolen: return True return False 2024. 4. 7.
[CheckIO/Electronic Station] acceptable-password-iii 1. Problem: https://py.checkio.org/en/mission/acceptable-password-iii/ 2. My solution def is_acceptable_password(password: str) -> bool: # your code here if len(password) < 6: return False else: list_boolen = [ x.isnumeric() for x in list(password)] if True in list_boolen : if False in list_boolen: return True return False 2024. 4. 7.
[CheckIO/Electronic Station] acceptable-password-ii 1. Problem: https://py.checkio.org/en/mission/acceptable-password-ii/ 2. My solution def is_acceptable_password(password: str) -> bool: # your code here if len(password) < 6: return False else: if True in [ x.isnumeric() for x in list(password)]: return True else: return False 2024. 4. 7.
[CheckIO/Electronic Station] digits-multiplication 1. Problem: https://py.checkio.org/en/mission/digits-multiplication/ 2. My solution: def checkio(number: int) -> int: # your code here dummy = 1; for number in list(str(number)): if int(number) != 0: dummy *=int(number) return dummy 2024. 4. 7.
[CheckIO/Scientific-Expedition] Secret Message 1. Problem: https://py.checkio.org/en/mission/secret-message/ 2. My solution def find_message(message: str) -> str: # your code here dummy = ''; for char in list(message): if char.isupper(): dummy+=char return dummy 2024. 4. 7.
[CheckIO/Scientific Expedition] striped words 1. Problem: https://py.checkio.org/en/mission/striped-words/ 2. My solution import re def checkio(line: str) -> int: text = re.sub(r'[^\w\s]', " ", line) vowel_list = ["a", "e", "i", "o", "u", "y"] consonant_list = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z"] number_striped_words = 0 for dummy_text in text.split(" "): if dummy_text.isnumeri.. 2024. 3. 24.
[CheckIO/Scientific Expedition] Beat The Previous 1. Problem: https://py.checkio.org/en/mission/beat-the-previous/ 2. My solution def beat_previous(digits: str) -> list[int]: # your code here dummy_list = [] list_digits = list(digits) dummy_number = "0" for index in range(len(list_digits)): if index == 0: dummy_list.append(int(list_digits[index])) else: dummy_number+=list_digits[index] if int(dummy_number) 2024. 3. 24.
[CheckIO/Scientific Expedition] Pangram 1. Problem: https://py.checkio.org/en/mission/pangram/ 2. My solution def check_pangram(text): ''' is the given text is a pangram. ''' # your code here List = [] pangram = "" for character in list(text.lower()): if ord(character) 96: List.append(character) for char in sorted(set(List)): pangram +=char if pangram == "abcdefghijklmnopqrstuvwxyz": return True else: return.. 2024. 3. 24.
728x90