Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write a python program Problem 1 Open and read in the data from all three files. Read each line into its own variable, with

image text in transcribed

please write a python program

Problem 1 Open and read in the data from all three files. Read each line into its own variable, with the appropriate data type. Calculate and print the average x- and y-coordinates given by all three files. Problem 2 Now it's time to find out which coffeeshop is closest! We'll use Euclidean distance as our distance measure first, one of many ways that data scientists measure how far apart two data points are. Given two points (X1,91), (x2, y2), Euclidean distance is defined as: euclidean = |(x2 xy)2 + (y2 y)2 You can compute the whole thing using just the mathematical operators we covered last week. A square root is the same as raising to the 1/2 power. Calculate three things, and print them all out: Euclidean distance between my house and Starbucks, Euclidean distance between my house and Dunkin' Donuts, and The smaller (minimum) of the two distances. (You can use the same min function as last week for the bikes.) . . For full credit under the documentation category, figure out and comment with the expected Euclidean distances. Do this before you start coding -- that way you know if your program works! # Test cases # House to Starbucks (Euclidean): # House to Dunkin' (Euclidean)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions