user
Create a function that takes three parameters and returns the greatest of them.
assistant

// Create a function to find the greatest of three numbers

// Inputs: three numbers
// Outputs: the greatest of the numbers

// Algorithm

1. Create a function that takes three parameters
2. Initialize a variable to hold the maximum one
3. Check if the first number is greater than the other two
4. If yes, assign it to the maximum one
5. Else, check if the second number is greater than the other two
6. If yes, assign it to the maximum one
7. Else, assign the third number to the maximum one
8. Return the maximum one

Example:

// Function
def find_max(num1,num2,num3):
  max_one = 0
  if num1>num2 and num1>num3:
    max_one = num1
  elif num2>num1 and num2>num3:
    max_one = num2
  else:
    max_one = num3
  return max_one

// Output
find_max(8,4,7)

// Result
 8