66.0k views
0 votes
Write the definition of a function printLarger, which has two int parameters and returns nothing. The function prints the larger value of the two parameters on a single line by itself. (For purposes of this exercise, the "larger" means "not the smaller".)

1 Answer

4 votes

Answer:

def printLarger(x: int ,y: int):

print(max(x,y))

Step-by-step explanation:

The function is written in python as follows:

  1. the fuction printLarger takes two integer parameters x and y
  2. max() function determines larger value of x and y. If the numbers are the same it prints the value of the numbers as the largest value.
  3. the function prints the larger value.

User Rth
by
6.2k points