451,779 views
25 votes
25 votes
Project Stem 2.7 code practice question 2 (python)

The following lines of code represent some locations of a sea turtle that are denoted with black pins in latitudes and longitudes.


lat = [15.18, 15.11, 15.12, 15.12, 15.08, 14.95, 14.87, 14.81, 14.81, 14.75, 14.73, 14.68, 14.55]

lon = [-62.942, -62.807, -62.622, -62.499, -62.438, -62.372, -62.352, -62.318, -62.321, -62.201, -62.150, -62.154, -61.915]


The lat list indicates how far north and south the positions are, and the lon list represents how far east and west the positions are. The larger the latitude value, the further north the seal was located, and for this area of the world, the larger the longitude value, the further east the turtle is located.


Write a program to calculate the farthest in each direction that the turtle was located throughout its travels. Add four print statements to the lines of code above that output the following, where the number signs are replaced with the correct values from the correct list:


Farthest north is #

Farthest west is #

Farthest south is #

Farthest east is #

User Darajan
by
2.9k points

1 Answer

26 votes
26 votes

Answer:

lat = [15.18, 15.11, 15.12, 15.12, 15.08, 14.95, 14.87, 14.81, 14.81, 14.75, 14.73, 14.68, 14.55]

lon = [-62.942, -62.807, -62.622, -62.499, -62.438, -62.372, -62.352, -62.318, -62.321, -62.201, -62.150, -62.154, -61.915]

print("Farthest north is " + str(max(lat)))

print ("Farthest west is " + str(min(lon)))

print ("Farthest south is " + str(min(lat)))

print("Farthest east is " + str(max(lon)))

Step-by-step explanation:

trust me bro

User Richard Corden
by
2.7k points