132k views
1 vote
Python and using function

Takes two integer parameters. Returns the integer that is closest to 10

User Lord
by
4.9k points

1 Answer

3 votes

Answer:

def closest_to_10(num1, num2):

if num1-10 < num2-10:

return num2

else:

return num1

Step-by-step explanation:

User Harinarayanan K S
by
5.2k points