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
Given a two-dimensional steady inviscid air flow field with no body forces described by the velocity field given below. Assuming
kolbaska11 [484]

Answer:

the pressure gradient in the x direction = -15.48Pa/m

Explanation:

  • The concept of partial differentiation was used in the determination of the expression for u and v.
  • each is partially differentiated with respect to x and the appropriate substitution was done to get the value of the pressure gradient as shown in the attached file.

4 0
3 years ago
Steam at 4 MPa and 350°C is expanded in an adiabatic turbine to 125kPa. What is the isentropic efficiency (percent) of this turb
guajiro [1.7K]

Answer:

\eta_{turbine} = 0.603 = 60.3\%

Explanation:

First, we will find actual properties at given inlet and outlet states by the use of steam tables:

AT INLET:

At 4MPa and 350°C, from the superheated table:

h₁ = 3093.3 KJ/kg

s₁ = 6.5843 KJ/kg.K

AT OUTLET:

At P₂ = 125 KPa and steam is saturated in  vapor state:

h₂ = h_{g\ at\ 125KPa} = 2684.9 KJ/kg

Now, for the isentropic enthalpy, we have:

P₂ = 125 KPa and s₂ = s₁ = 6.5843 KJ/kg.K

Since s₂ is less than s_g and greater than s_f at 125 KPa. Therefore, the steam is in a saturated mixture state. So:

x = \frac{s_2-s_f}{s_{fg}} \\\\x = \frac{6.5843\ KJ/kg.K - 1.3741\ KJ/kg.K}{5.91\ KJ/kg.K}\\\\x = 0.88

Now, we will find h_{2s}(enthalpy at the outlet for the isentropic process):

h_{2s} = h_{f\ at\ 125KPa}+xh_{fg\ at\ 125KPa}\\\\h_{2s} = 444.36\ KJ/kg + (0.88)(2240.6\ KJ/kg)\\h_{2s} = 2416.088\ KJ/kg

Now, the isentropic efficiency of the turbine can be given as follows:

\eta_{turbine} = \frac{h_1-h_2}{h_1-h_{2s}}\\\\\eta_{turbine} = \frac{3093.3\ KJ/kg-2684.9\ KJ/kg}{3093.3\ KJ/kg-2416.088\ KJ/kg}\\\\\eta_{turbine} = \frac{408.4\ KJ/kg}{677.212\ KJ/kg}\\\\\eta_{turbine} = 0.603 = 60.3\%

3 0
3 years ago
You want to find all files on your server that have either the SGID or SUID permission set. Which command should you use to obta
aalyn [17]

Answer:

For SGID you type this

$ find . -perm /4000

For SUID you type this

$ find . -perm /2000

Explanation:

Auxiliary file permissions, that are commonly referred to as “special permissions” in Linux are needed in order to easily find files which have SUID (Setuid) and SGID (Setgid) set.

After typing

$ find directory -perm /permissions

Then type the commands in the attachment below to obtain a list of these files with SGID and SUID.

3 0
4 years ago
A large class with 1,000 students took a quiz consisting of ten questions. To get an A, students needed to get 9 or 10 questions
VMariaS [17]

Answer:

a. 0.11

b. 110 students

c. 50 students

d. 0.46

e. 460 students

f. 540 students

g. 0.96

Explanation:

(See attachment below)

a. Probability that a student got an A

To get an A, the student needs to get 9 or 10 questions right.

That means we want P(X≥9);

P(X>9) = P(9)+P(10)

= 0.06+0.05=0.11

b. How many students got an A on the quiz

Total students = 1000

Probability of getting A = 0.11 ---- Calculated from (a)

Number of students = 0.11 * 1000

Number of students = 110 students

So,the number of students that got A is 110

c. How many students did not miss a single question

For a student not to miss a single question, then that student scores a total of 10 out of possible 10

P(10) = 0.05

Total Students = 1000

Number of Students = 0.05 * 1000

Number of Students = 50 students

We see that 5

d. Probability that a student pass the quiz

To pass, a student needed to get at least 6 questions right.

So we want P(X>=6);

P(X>=) =P(6)+P(7)+P(8)+P(9)+P(10)

=0.08+0.12+0.15+0.06+0.05=0.46

So, the probability of a student passing the quiz is 0.46

e. Number of students that pass the quiz

Total students = 1000

Probability of passing the quiz = 0.46 ----- Calculated from (d)

Number of students = 0.46 * 1000

Number of students = 460 students

So,the number of students that passed the test is 460

f. Number of students that failed the quiz

Total students = 1000

Total students that passed = 460 ----- Calculated from (e)

Number of students that failed = 1000 - 460

Number of students that failed = 540

So,the number of students that failed is 540

g. Probability that a student got at least one question right

This means that we want to solve for P(X>=1)

Using the complement rule,

P(X>=1) = 1 - P(X<1)

P(X>=1) = 1 - P(X=0)

P(X>=1) = 1 - 0.04

P(X>=1) = 0.96

7 0
3 years ago
Many farms and ranches use electric fences to keep animals from getting into or out of specific pastures. When switched on, an e
Nikolay [14]

Answer:

Aluminum

Explanation:

The best material to use when creating an electric fence would be Aluminum. Aluminum wiring is incredibly durable and can be easily obtained. Since aluminum is a non-magnetic metal its conducting capabilities far exceed other metallic options in the market and is also why companies choose aluminum for their high tension cable wiring. Aside from being more expensive than other feasible options its durability and conducting capabilities make it easily the best option.

7 0
3 years ago
Read 2 more answers
Other questions:
  • an existing highway-railway at-grade crossing is being redesigned as grade separated to improve traffic operations. The railway
    8·1 answer
  • An n- channel enhancement- mode MOSFET with 50 nm thick HfO2 high- k gate dielectric (Pr = 25) has a flat band voltage of 0.5 V,
    5·1 answer
  • Overview In C, a string is simply an array of characters. We have used literal strings all along – the stuff in between the quot
    11·1 answer
  • Realize the function f(a, b, c, d, e) = Σ m(6, 7, 9, 11, 12, 13, 16, 17, 18, 20, 21, 23, 25, 28)using a 16-to-1 MUX with control
    13·1 answer
  • At a construction site, there are constant arguments and conflicts amongst workers of different contractors and sub-contractors.
    14·1 answer
  • Quinn’s relatives relayed a story about putting on a headset and seeing a digital world that they could walk around in and explo
    8·2 answers
  • A benefit to using the medium the author used in "Great Rock and Roll
    12·2 answers
  • REVVIVE ME MY MOM WALKED IN MY ROOM AND SCARED THE BAJESUS OUTTA ME
    5·2 answers
  • Outline how effective brainstorming should be set up so that it does not go off-track or alienate anyone.
    15·1 answer
  • The thrust angle is checked by referencing
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!