1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leona [35]
3 years ago
8

The longest_word function is used to compare 3 words. It should return the word with the most number of characters (and the firs

t in the list when they have the same length). Fill in the blank to make this happen.
Engineering
1 answer:
NARA [144]3 years ago
4 0

Answer:

len(word2) >= len(word1) and len(word2) >= len(word3):

Question with blank is below

def longest_word(word1,word2,word3):

   if len(word1) >= len(word2) and len(word1) >= len(word3):

       word = word1

   elif _________________________________________

       word = word2

   else:

       word = word3

   return word

print(longest_word("chair","couch","table"))

print(longest_word("bed","bath","beyond"))

print(longest_word("laptop","notebook","desktop"))

print(longest_word("hi","cat","Cow"))

Explanation

In line 1 of the code word1, word2, and word3 are the parameters used to for the defining the longest_word function. They will be replaced by 3 words to be compared. The code that is filled in the blank is len(word2) >= len(word1) and len(word2) >= len(word3): It is a conditional statement that is true only if the number of characters in the string of word2 is greater than or equal to word1 and word2 is greater than that of word3 .

You might be interested in
HELP PLEASE!!!!
DaniilM [7]

Answer:

DESCULPA MAS EU NÃO ENTENDI

8 0
3 years ago
Is a jeep cherokee faster than a bmw 325i
soldier1979 [14.2K]

Answer:

Yes

Explanation:

8 0
3 years ago
Read 2 more answers
If a 9V battery produces a current of 3 A through a load, what is the resistance of the load
Elden [556K]

3 ohms hope this helps :D ❤

7 0
3 years ago
Read 2 more answers
A gearbox is needed to provide an exact 30:1 increase in speed, while minimizing the
alekssr [168]

Answer:

answer

Explanation:

4 0
3 years ago
A 6V battery is connected in series with two bulbs. What would the voltage drop be across each bulb?
Vitek1552 [10]

Answer:

3V

Explanation:

6 0
3 years ago
Other questions:
  • A circular section of material is tested. The original specimen is 200 mm long and has a diameter of 13 mm. When loaded to its p
    11·2 answers
  • You are given a partial implementation of one header file, GildedRose.hpp. Item is a class that holds the information for each i
    6·1 answer
  • A tank with a volume of 8 m3 containing 4 m3 of 20% (by volume) NaOH solution is to be purged by adding pure water at a rate of
    8·1 answer
  • Write a function named is_float(s) that takes one argument that is a string. It returns True if string s represents a floating p
    6·1 answer
  • A satellite would have a mass of 270 kg on the surface of Mars. Determine the weight of the satellite in pounds if it is in orbi
    12·1 answer
  • 5) /
    12·1 answer
  • How did humans create a space suit without ever going. How did we know spaces conditions?
    5·2 answers
  • La iluminación de la superficie de un patio amplio es 1600 lx cuando el ángulo de elevación del sol 53°. Calcular la iluminación
    15·1 answer
  • An isothermal CSTR with a first order irreversible reaction A â> B (and rA[mol/(ft3*min)] = - 0.5 CA) has a constant flow rat
    13·1 answer
  • 4.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!