작품에 대해 상세하게 소개해주세요.
개발 이유
<aside> 💡 프로그램을 개발하며 불편했던 경우가 많이 있었고, 나만의 모듈이 있으면 좋을 것같았다.
</aside>
작품 목표
<aside> 💡 내가 평상시에 프로그래밍을 할때 더욱 간편하게 짤수있도록 한다. 아무리 원래 있던 코드가 있어도 내가 불편하면 무조건적으로 만든다.
</aside>
필요 기능
<aside> 💡 내가 평소에 불편했던 것들을 개선할수있는 모듈을 제작한다. 궁극적으로 한국어를 모스부호로 변환하는 코드를 만드는 것이 목표이다.
</aside>
제작일
<aside> 💡 2023/8/9 ~ 현재
</aside>
<aside> 💡 최신버전은 아래에 있습니다.(총 7개의 함수)
</aside>
import random
def descending(x):
a = x.copy()
b = []
for i in range(len(a)):
b.append(max(a))
a.remove(max(a))
return b
def ascending(x):
a = x.copy()
b = []
for i in range(len(a)):
b.append(min(a))
a.remove(min(a))
return b
def fac(x):
n = 1
for i in range(1, x+1):
n *= i
return n
def reversenum(a):
a1 = a
return int(str(a1)[::-1])
def mos(a):
wordlist = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'W', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', ' ', ',', '.', '?', ';', ':', '/', '-',
"'", '(', ')', '@']
codelist = ['.-', '-...', '-.-.', '-..', '.', '..-.', '--.', '....',
'..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.',
'--.-', '.-.', '...', '-', '..-', '...-', '.--', '-..-',
'-.--', '--..', '-----', '.----', '..---', '...--', '....-',
'.....', '-....', '--...', '---..', '----.','/', '--..--',
'.-.-.-', '..--..', '-.-.-', '---...', '-..-.', '-....-',
'.----.', '-.--.', '-.--.-', '.--.-.']
x = list(a.lower())
y = len(x)
for i in range(y):
print(codelist[wordlist.index(x[i])], end = ' ')
def pythatrian(a, b, c):
if a ** 2 + b ** 2 == c ** 2:
return 1
else:
return 0
def root(a):
return a**(1/2)