Skip to main content
added 796 characters in body
Source Link

Jelly u / Python 3 + jelly, 8170 bytes = 40.535

importfrom jelly import*
a=jelly.sysa=sys.argv
jelly.main(a[1],[*map(jelly.try_eval,a[2:])],'')
ŒV

Try it online!Try it online! (Jelly)

Try it online!Try it online! (Python)

Both error after executing the other language.

This is a bit of a cheat tbh. Jelly has an "execute as Python" builtin, ŒV, and, as of April 9, 2018, Jelly is a pip-installable package, meaning that we can just import it and run it.

How they work

Jelly ignores every line except for the last, and just runs that:

ŒV - Main link. Takes a string on the left
ŒV - Execute the string as Python code

For some reason, I think because of the [...] in the above lines, there's some parsing error thrown afterwards.

For Python, we import the contents of the jelly package, read and evaluate the command-line arguments, then run the program in the first command-line argument with the values in the second and third arguments

Jelly / Python 3 + jelly, 81 bytes = 40.5

import jelly
a=jelly.sys.argv
jelly.main(a[1],[*map(jelly.try_eval,a[2:])],'')
ŒV

Try it online! (Jelly)

Try it online! (Python)

Both error after executing the other language

Jelly u / Python 3 + jelly, 70 bytes = 35

from jelly import*
a=sys.argv
main(a[1],[*map(try_eval,a[2:])],'')
ŒV

Try it online! (Jelly)

Try it online! (Python)

Both error after executing the other language.

This is a bit of a cheat tbh. Jelly has an "execute as Python" builtin, ŒV, and, as of April 9, 2018, Jelly is a pip-installable package, meaning that we can just import it and run it.

How they work

Jelly ignores every line except for the last, and just runs that:

ŒV - Main link. Takes a string on the left
ŒV - Execute the string as Python code

For some reason, I think because of the [...] in the above lines, there's some parsing error thrown afterwards.

For Python, we import the contents of the jelly package, read and evaluate the command-line arguments, then run the program in the first command-line argument with the values in the second and third arguments

Source Link

Jelly / Python 3 + jelly, 81 bytes = 40.5

import jelly
a=jelly.sys.argv
jelly.main(a[1],[*map(jelly.try_eval,a[2:])],'')
ŒV

Try it online! (Jelly)

Try it online! (Python)

Both error after executing the other language