Python, but it received the worst translation.

From Esolang
Jump to navigation Jump to search

Python, but it received the worst translation. is a joke esolang by User:Yoyolin0409. Since the translation results are usually the same each time, it is possible that this is feasible. The translation process is as follows: Translate to Chinese, then to English, and select the translation that differs from the original. Different capitalization is considered the same translation. If no result is found, return to the "Translate to Chinese" section and select the second Chinese translation. Repeat until you get a useful result. If none are found, you'll have to use the original text. Numbers will not be translated, special characters will not be translated, and strings within quotation marks will not be translated. In some cases, the result of turning one can be connected by an underscore. Although it's useless, translating variable names would be hilarious. Each word is translated individually. A word is defined by being separated by a special character or a space.

Example

List

Translate Original Text Keyword? (If it's not written, then it's not.)
version print
definition def Yes
in order to for Yes, but useless(Because there are no spaces in the variable names.)
exist in Yes
scope range
point f
you n
in case if Yes, but useless(Because there are no spaces in the variable names.)
full name name
foremost main
clone repr
although while Yes
real True Yes
Integer int
backing-out return Yes
enter input
Other else Yes
Bollinger_values bool
Incorrect False Yes
and sum
Ster str
enter port import Yes, but useless(Because there are no spaces in the variable names.)
system sys
List enumerate
Additional append
Pop_music pop
lens len
Standard_Input stdin
comma read
order ord
gram chr
coda end
no not Yes
harmonious and Yes
act as Yes
assertion assert Yes
asynchronous async Yes
wait await Yes
rest break Yes
regular class Yes
continuance continue Yes
del del Yes
elif elif Yes
Apart from except Yes, but useless(Because there are no spaces in the variable names.)
at last finally Yes, but useless(Because there are no spaces in the variable names.)
lax from Yes
worldwide global Yes
yes is Yes (It seems to repeat 'n', but that doesn't matter because an 'n' to be translated will only appear after a backslash '\', making it easy for us to distinguish them.)
lambda lambda Yes
No None Yes
Non-local nonlocal Yes
peradventure or Yes
go through pass Yes, but useless(Because there are no spaces in the variable names.)
Increase raise Yes
attempt try Yes
and with Yes (Oh no, another duplicate, but it's still easy to spot.)
surrender yield Yes
matching match Soft
kneading case Soft
_ _ Soft
class type Soft
coding coding
scope round Oh no, another duplicate, but it's still easy to spot.
clone copy Oh fuck, another duplicate, but it's still easy to spot.
project items
Voltage voltage
state of affairs state
mobile action
criterion standard
parameter arg
Location pos
but only
Kodak kwd
type sort W.H.A.T. Why did he translate it like that?
lock opener key
document doc
annotation annotations
lengthen extend
break in insert
eliminate remove
purge clear
exponent index
earl count
back reverse
collect collections
Double deque
popleft popleft
measure word for long pieces strip
reclaimed row
zipper zip
put set
dictionary dict
Sort sorted

Hello, world!

version("Hello, world!")

99 bottles of beer(maybe cheat)

definition bottle_ablative_cause_suffix_brewage(beginning=99):
   in order to you exist scope(beginning, 1, -1):
       version(point"{you} bottles of beer on the wall,")
       version(point"{you} bottles of beer.")
       version("Take one down, pass it around,")
       version(point"{you-1} bottles of beer on the wall.\you")
   version("1 bottle of beer on the wall,")
   version("1 bottle of beer.")
   version("Take one down, pass it around,")
   version("No bottles of beer on the wall.\you")
   version("No bottles of beer on the wall,")
   version("No bottles of beer.")
   version("Go to the store, buy some more,")
   version(point"{beginning} bottles of beer on the wall.")
in case __full_name__ == "__foremost__":
   bottle_ablative_cause_suffix_brewage(99)

Quine

Small='yes="Small="+clone(Small)+"\\you"\youversion(yes+Small)'
yes="Small="+clone(Small)+"\you"
version(yes+Small)

Fibonacci sequence(It won't end on its own)

definition Fibonacci():
   one, Book = 1, 1
   although real:
       version(one)
       one, Book = Book, one + Book
Fibonacci()

Factorial

definition factorial(you: Integer) -> Integer:
   bottom_line = 1
   in order to me exist scope(1, you + 1):
       bottom_line *= me
   backing-out bottom_line
digital = Integer(enter("Please enter a non-negative integer:"))
in case digital < 0:
   version("Factorials are defined only on non-negative integers.")
Other:
   version(point"{digital}! = {factorial(digital)}")

Prime

definition yes_Main(digital: Integer) -> Bollinger_values:
   in case digital < 2:
       backing-out Incorrect
   in order to me exist scope(2, Integer(digital ** 0.5) + 1):
       in case digital % me == 0:
           backing-out Incorrect
   backing-out real
you = Integer(enter("Please enter the number of prime numbers you want to output:"))
in case you <= 0:
   version("Please enter an integer greater than 0.")
Other:
   earl = 0
   operating = 2
   although earl < you:
       in case yes_Main(operating):
           version(operating)
           earl += 1
       operating += 1

Disan Count

you = Integer(enter("Please enter an integer:"))
in case you < 0:
   version("Please enter an integer greater than or equal to 0.")
Other:
   in order to me exist scope(0, you + 1):
       in case me % 2 == 0:
           version(me)

Cat

one=enter("Enter something")
version(one)

Digital root calculator

definition fingers_rooted(you: Integer) -> Integer:
   although you >= 10:
       you = and(Integer(digital) in order to digital exist Ster(you))
   backing-out you
digital2 = Integer(enter("Please enter a non-negative integer:"))
in case digital2 < 0:
   version("Please enter a non-negative integer.")
Other:
   version(point"The numerical root of {digital2} is: {fingers_rooted(digital2)}")

Brainfuck Interpreter

enter port system
definition Boyfriend(code_of_laws):
    yes=[]
    Contest={}
    magnetic_tape=[0]*1000000
    in order to me,At_once exist List(code_of_laws):
        in case At_once=='[':
            yes.Additional(me)
        in case At_once==']':
            rice=yes.Pop_music()
            Contest[rice]=me
            Contest[me]=rice
    product=0
    Afraid=0
    although product<lens(code_of_laws):
        in case code_of_laws[product]=='+':
            magnetic_tape[Afraid]=(magnetic_tape[Afraid]+1)%256
        in case code_of_laws[product]=='-':
            magnetic_tape[Afraid]=(magnetic_tape[Afraid]-1)%256
        in case code_of_laws[product]==',':
            from=system.Standard_Input.comma(1)
            magnetic_tape[Afraid]=(order(from) in case from Other 0)%256
        in case code_of_laws[product]=='.':
            version(gram(magnetic_tape[Afraid]),coda='')
        in case code_of_laws[product]=='<':
            Afraid-=1
        in case code_of_laws[product]=='>':
            Afraid+=1
        in case code_of_laws[product]=='[':
            in case no magnetic_tape[Afraid]:
               product=Contest[product]
        in case code_of_laws[product]==']':
            in case magnetic_tape[Afraid]:
               product=Contest[product]
        product+=1
Boyfriend(system.Standard_Input.comma())