Numbers

Learning from AstroPlatformer

Code Runner Challenge

numbers

View IPYNB Source
%%js
// CODE_RUNNER: numbers

const px = 30, py = 320, platX = 40, platY = 290;
const dist = Math.sqrt((px-platX)**2 + (py-platY)**2);
console.log("Distance:", dist.toFixed(1));
const total = 5 + 1;
console.log("Coins:", total);

Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...