OX퀴즈 (1) 썸네일형 리스트형 코딩 테스트 연습 19일 코딩 테스트 연습 19일 프로그래머스, OX퀴즈 📄 나의 코드 quiz = ["19 - 6 = 13", "5 + 66 = 71", "5 - 15 = 63", "3 - 1 = 2"] def solution(quiz): answer = [] for str in quiz: arr_str = str.split(" ") if arr_str[1] == '-': result = int(arr_str[0]) - int(arr_str[2]) elif arr_str[1] == '+': result = int(arr_str[0]) + int(arr_str[2]) if result == int(arr_str[4]): answer.append("O") else: answer.append("X") return answer pri.. 이전 1 다음