help plz

1. Write a function to return the larger of two numbers entered from two user inputted values, where the user inputs are entered after the displays of “First Entry =” and “Second Entry = ”. The numbers should be decimal values (not just integers).



2. Write a function to return the word that is first alphabetically from two user inputted text entries, where the user inputs that text by entering their own words after the displays of “First Entry =“ and “Second Entry =“. Remember that you can use the operators with strings. (You can assume that the user only inputs lower case words.)

Respuesta :

1.

first = float(input("First Entry = "))

second = float(input("Second Entry = "))

def func(num1, num2):

   return max(num1, num2)

print(func(first, second))

2.

first = input("First Entry = ")

second = input("Second Entry = ")

def func(word1, word2):

   return sorted([word1,word2])[0]

print(func(first, second))

I hope this helps!

In this exercise we have to use the knowledge of computational language in python to write the following code:

The code can be found in the attached image.

That way, to find it more easily we have the code like:

  • First code:

first = float(input("First Entry = "))

second = float(input("Second Entry = "))

def func(num1, num2):

  return max(num1, num2)

print(func(first, second))

  • Second code:

first = input("First Entry = ")

second = input("Second Entry = ")

def func(word1, word2):

  return sorted([word1,word2])[0]

print(func(first, second))

See more about python at brainly.com/question/26104476

Ver imagen lhmarianateixeira
Ver imagen lhmarianateixeira
ACCESS MORE