BestPromptFinder
HomeCoding › Below is an instruction that describes a task. Write a respo...

Below is an instruction that describes a task. Write a respo...

Coding · General · Coding
60Quality
87%Useful
85Reliability

The prompt

Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Write a Python program that calculates the distance between two points on a two-dimensional plane. ### Input: Point1 (x1: 3, y1: 4); Point2 (x2: -9, y2: -2) ### Output: #include #include int main() { int x1 = 3; int y1 = 4; int x2 = -9; int y2 = -2; float distance = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); std::cout << "Distance between the two points is: " << distance << std::endl; return 0; }
Find similar in the app →

Why this prompt

Source

Hugging Face

Related Coding prompts

PRD to MVP Technical Plan
Quality 93 · Claude Code
Full-Stack CRUD App Builder
Quality 93 · Claude Code
Legacy Refactor Planner
Quality 93 · Claude Code
Test Suite Generator
Quality 93 · Claude Code
Third-Party API Integration
Quality 93 · Claude Code
Database Schema and Migration
Quality 93 · Claude Code