107 451
Assignments Done
97.2%
Successfully Done
In May 2023

# Answer to Question #209072 in Electrical Engineering for mona

Question #209072

Write and execute a PYTHON program to perform separate files for each of the tasks

1.Write a program in Python to enter three numbers and find the largest among the three

1
Expert's answer
2021-06-24T17:16:01-0400

def findLargest(num1, num2, num3): #user-defined function

# find largest numbers

if (num1 >= num2) and (num1 >= num3):

largest = num1

elif (num2 >= num1) and (num2 >= num3):

largest = num2

else:

largest = num3

return largest #return value

# take inputs

num1 = float(input('Enter first number: '))

num2 = float(input('Enter second number: '))

num3 = float(input('Enter third number: '))

# function call

maximum = findLargest(num1, num2, num3)

# display result

print('The largest number = ',maximum)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

#### Comments

No comments. Be the first!

### Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS