diff --git a/argorithm/coin.py b/argorithm/coin.py new file mode 100644 index 0000000..0a7040f --- /dev/null +++ b/argorithm/coin.py @@ -0,0 +1,9 @@ +def solution(money, expected, actual): + answer = -1 + + return answer + + +if __name__ == '__main__': + real_answer = solution(1000, ['H', 'T', 'H', 'T', 'H', 'T', 'H'], ['T', 'T', 'H', 'H', 'T', 'T', 'H']) + print(real_answer) \ No newline at end of file diff --git a/argorithm/grades.py b/argorithm/grades.py new file mode 100644 index 0000000..c6c002d --- /dev/null +++ b/argorithm/grades.py @@ -0,0 +1,7 @@ +def solution(grades, weights, threshold): + answer = -1234567890 + grade_weight = [{'A+':10}, {'A0':9}, {'B+':8}, {'B0':7}, {'C+':6}, {'C0':5}, {'B+':4}, {'B0':3}, {'F':0}] + return grade_weight + +if __name__ == '__main__': + real_answer = solution(['A+', 'D+', 'F', 'C0'], [2, 5, 10, 3], 50) \ No newline at end of file diff --git a/argorithm/str_split.py b/argorithm/str_split.py new file mode 100644 index 0000000..2a81633 --- /dev/null +++ b/argorithm/str_split.py @@ -0,0 +1,15 @@ +def solution(s, op): + answer = [] + s_list = list(s) + for i in range(len(s_list)-1): + s_left = int(''.join(map(str, s_list[:i+1]))) + print('s_left : ', s_left) + s_right = int(''.join(map(str, s_list[i+1:]))) + print('s_right : ', s_right) + answer.append(s_left + s_right) + return answer + + +if __name__ == '__main__': + real_answer = solution('1234','+') + print(real_answer) \ No newline at end of file