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()
'Programming' 카테고리의 다른 글
Rust 언어의 단점 (0) | 2024.06.13 |
---|---|
CodeConvert 소개 (0) | 2024.04.20 |
(Julia) Zero-based indexing ... (not) again (0) | 2024.01.29 |
(Julia) 매크로 (0) | 2024.01.26 |
(Racket) Collatz (0) | 2024.01.09 |