0830. Switch it Up!
When provided with a number between 0-9, return it in words. Input :: 1 Output :: "One". Solution: def as_word(func): def wrapper(number, *args): ko_word = ["영", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구"][number] en_word = ["Zero","One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"][number] return func(ko_word, en_word, *args) return wrapper @as_word def switch_it_up(ko_word..
2022. 8. 30.
0828. Basic Mathematical Operations
Your task is to create a function that does four basic mathematical operations. The function should take three arguments - operation(string/char), value1(number), value2(number). The function should return result of numbers after applying the chosen operation. Examples(Operator, value1, value2) --> output ('+', 4, 7) --> 11 ('-', 15, 18) --> -3 ('*', 5, 5) --> 25 ('/', 49, 7) --> 7 Solution: def..
2022. 8. 28.