Can someone pls help fix my code on Project stem. 2.7 Code Practice: Question 1 (Python no Java script)

lat = [40.59, 40.52, 40.621, 40.519, 40.56, 41.265, 40.61, 40.806, 41.259, 41.265, 41.264, 41.259, 41.262, 41.263]
lon = [69.532, 69.419, 69.354, 69.263, 69.478, 70.805, 69.706, 70.331, 70.815, 70.823, 70.815, 70.81, 70.824, 70.811, 70.811]
print("Farthest north = " + str(max(lat)))
print("Farthest west = " + str(max(lon)))
print("Farthest south = " + str(min(lat)))
print("Farthest east = " + str(min(lon)))

Can someone pls help fix my code on Project stem 27 Code Practice Question 1 Python no Java script lat 4059 4052 40621 40519 4056 41265 4061 40806 41259 41265 4 class=

Respuesta :

fichoh

The required code which displays the largest of three user supplied integer values written in python is as follows :

num_1 = int(input())

#takes first integer input from user

num_2 = int(input())

#takes second integer input from user

num_3 = int(input())

#takes third integer input from user

def maximum(num_1, num_2, num_3):

#initiates a function named maximum which takes the three user defined inputs

largest = num_1

#sets num_1 as the largest

if (num_2 > num_1) and (num_2 >num_3):

#checks if num_2 is greater than the first and third input

largest = num_2

#if TRUE set the second input as the largest

elif (num_3 > num_1) and (num_3 > num_2):

#checks if num_3 is greater than the first and second input

largest = num_3

#if TRUE, set the third input as the largest

return largest

# return the largest value after evaluation.

print('Largest value is :' + str(maximum(num_1, num_2, num_3)))

#displays the maximum value of the three inputs.

The result of the code processed is attached in the picture below.

Learn more :https://brainly.com/question/14786286

Ver imagen fichoh