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]
4 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]4 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
A Si sample contains 1016 cm-3 In acceptor atoms and a certain number of shallow donors, the In acceptor level is 0.16 eV above
creativ13 [48]

Answer:

6.5 × 10¹⁵/ cm³

Explanation:

Thinking process:

The relation N_{o} = N_{i} * \frac{E_{f}-E_{i}  }{KT}

With the expression Ef - Ei = 0.36 × 1.6 × 10⁻¹⁹

and ni = 1.5 × 10¹⁰

Temperature, T = 300 K

K = 1.38 × 10⁻²³

This generates N₀ = 1.654 × 10¹⁶ per cube

Now, there are 10¹⁶ per cubic centimeter

Hence, N_{d}  = 1.65*10^{16}  - 10^{16} \\           = 6.5 * 10^{15} per cm cube

5 0
3 years ago
Read 2 more answers
An aluminum metal rod is heated to 300oC and, upon equilibration at this temperature, it features a diameter of 25 mm. If a tens
Natalka [10]

Answer:

It will results in mechanical hardening.

5 0
3 years ago
Read 2 more answers
Match the scenario to the term it represents.
Ann [662]

Answer:

i nrfvewv

Explanation:

3 0
3 years ago
Jnjn freeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pointtttttttttt
kvasek [131]

Answer:

thx

Explanation:

5 0
3 years ago
Read 2 more answers
Sketches are a very efficient way to share ideas.<br> True<br> False
timurjin [86]

Answer:

yes

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Determine displacement (in) of a 1.37 in diameter steel bar, which is 50 ft long under a force of 27,865 lb if elasticity modulu
    5·1 answer
  • Nitrogen gas flows through a long, constant-diameter adiabatic pipe. It enters at 100 psia and 120°F and leaves at 50 psia and 7
    14·2 answers
  • A large part in a turbine-generator unit operates near room temperature and is made of ASTM A470-8 steel ( ). A surface crack ha
    11·1 answer
  • Rosalind franklin<br> What was she famous for
    14·1 answer
  • An engineer measures a sample of 1200 shafts out of a certain shipment. He finds the shafts have an average diameter of 2.45 inc
    15·1 answer
  • What are practical considerations you might encounter when you increase the moment of inertia (I) while keeping the cross-sectio
    13·1 answer
  • What’s the answer???
    9·1 answer
  • The compression ratio of most small gasoline engines falls between_______and________.
    13·2 answers
  • Write a paragraph on computer 473
    5·1 answer
  • Flip-flops are normally used for all of the following applications, except ________. logic gates data storage frequency division
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!