The Coding Path
Learning Platform
The Coding Path
Online Compiler
🐍
Python 3.12
JavaScript ES6
C++ 20
Java 17
C 11
Swift 5.9
Go 1.21
Rust 1.75
PHP 8.2
Ruby 3.2
Pro Mode
Iron Mode
Run
main.py
1
2
3
4
5
6
7
8
9
10
import math def calculate_path(start, end): # Calculate the Euclidean distance x1, y1 = start x2, y2 = end distance = math.sqrt((x2 - x1)**2 + (y2 - y1)**2) return f"Distance: {distance:.2f}" print(calculate_path((0, 0), (5, 5)))
History
Reset
UTF-8
Line 12, Col 43
Console
Ready
$ python3 main.py
Distance: 7.07
❯