Science, asked by beingFRANK, 1 year ago

what is quasi 2 dimensional?​

Answers

Answered by karan638789
39

class Japanese:

def __init__(self, names):

self.names = names

def Word_start(self):

P = Japanese.Word_end(self)

return second(P, P[0], P[:2], P[:3])

def Word_end(self):

P = self.names

if not ' ' in self.names:

return (first(P, P[-1], P[-2:]))

else:

print('White space is not allowed. The program has stopped')

return __import__('sys').exit()

def all(self):

return third(Japanese.Word_end(self))

def first(p, m, n):

return f'{p}u' if any(x==m for i,x in enumerate([*'csrzkgpbf'])) else f"{p.replace(p[-2:], 'ji')}" if n == 'ge' else f"{p.replace(m, 'ru')}" if m == 'l' else f"{p.replace(m, 'mu')}" if m == 'm' or n == 'me' else f"{p.replace(n, 'ngu')}" if n == 'ng' else f"{p.replace(n ,'shu')}" if n == 'sh' else f'{p}o' if m == 't' or m == 'd' else f"{p.replace(m ,'kusu')}" if m == 'x' else f"{p.replace(n ,'nku')}" if n == 'nk' else f"{p.replace(n ,'suto')}" if n == 'st' else f'{p}'

def second(p, m, n, o):

return f"{p.replace(n, '{}ur')}".format(m) if any(x==n for i,x in enumerate(['bl','br','fl','fr','pl','pr'])) else f"{p.replace(n, 'kur')}" if n == 'cl' else f"{p.replace(n, 'kur')}" if n == 'cr' else f"{p.replace(n, 'kur')}" if n == 'kl' else f"{p.replace(n, 'dor')}" if n == 'dr' else f"{p.replace(n, 'tor')}" if n == 'tr' else f"{p.replace(n, 'gur')}" if n == 'gl' else f"{p.replace(n, 'gur')}" if n == 'gr' else f"{p.replace(n, 'suk')}" if n == 'sc' else f"{p.replace(n, 'suk')}" if n == 'sk' else f"{p.replace(o, 'sukur')}" if o == 'scr' else f"{p.replace(n, 'sur')}" if n == 'sl' else f"{p.replace(n, 'sum')}" if n == 'sm' else f"{p.replace(n, 'sun')}" if n == 'sn' else f"{p.replace(n, 'sup')}" if n == 'sp' else f"{p.replace(o, 'suk')}" if o == 'squ' else f"{p.replace(n, 'sut')}" if n == 'st' else f"{p.replace(m, 'eu')}" if m == 'w' else f'{p}'

def third(p):

return f"{p.replace('ur', 'aa').replace('er', 'aa').replace('ir', 'aa').replace('jion', 'jon').replace('th', 'su').replace('y', 'y').replace('ea', 'ii').replace('ther', 'zaa').replace('ce', 'se').replace('v', 'b').replace('e','u').replace('z','j').replace('er','a').replace('l','r')}"

Japan = Japanese((input() or 'Mirielle').lower())

print(f"Author: Mirielle\nDate: Oct. 2019\ncomment down if there's any mistake(s) in this program\n\n")

print(f"RESULT:\n{'-'*36}\nYour name:{' '*14}{Japan.names}")

print(f'Japanese pronunciation: {Japan.all()}')

Similar questions