Programming
Python to Julia Converter (codeconvert.ai)
steloflute
2024. 1. 30. 22:47
Python to Julia Converter (codeconvert.ai)
생각보다 잘 된다.
예제:
def problem1():
print sum(x for x in xrange(1, 1000) if x % 3 == 0 or x % 5 == 0)
def problem1a():
print sum(filter(lambda x:x%3==0 or x%5==0, xrange(1,1000)))
problem1()
# ->
function problem1()
println(sum(x for x in 1:999 if x % 3 == 0 || x % 5 == 0))
end
function problem1a()
println(sum(filter(x -> x % 3 == 0 || x % 5 == 0, 1:999)))
end
problem1()