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
Vlad1618 [11]
3 years ago
7

How would I get this python code to run correctly? it's not working.​

Engineering
1 answer:
Elanso [62]3 years ago
6 0

Answer:

See Explanation

Explanation:

This question requires more information because you didn't state what the program is expected to do.

Reading through the program, I can assume that you want to first print all movie titles then prompt the user for a number and then print the move title in that location.

So, the correction is as follows:

Rewrite the first line of the program i.e. movie_titles = ["The grinch......."]

for each_movie_titles in movie_titles:

   print(each_movie_titles)

   

usernum = int(input("Number between 0 and 9 [inclusive]: "))

if usernum<10 and usernum>=0:

   print(movie_titles[usernum])

Line by line explanation

This iterates through the movie_titles list

for each_movie_titles in movie_titles:

This prints each movie title

   print(each_movie_titles)

This prompts the user for a number between 0 and 9    

usernum = int(input("Number between 0 and 9 [inclusive]: "))

This checks for valid range

if usernum<10 and usernum>=0:

If number is valid, this prints the movie title in that location

   print(movie_titles[usernum])

You might be interested in
The concentration of carbon monoxide (co) in an exhaust gas is 1x10^4 ppmv. what is the concentration in mg/m^3 at 25 and 1 atm
Mrrafil [7]

Answer:

1.1451 x 104 (11451.13)mg/m3

Explanation:

1 ppmv is defined as one volume of a contaminant or solid(CO)(mL) in 1 x 106 volume of solvent/water.

1ppmv = 1mL/m3

Concentration in mg/m3 = volume in ppm x molecular weight x pressure(kPa)/( gas constant x temperature(K)

Molecular weight of CO = 12 + 16

= 28g/mol

Temperature = 273.15 + 25

= 298.15K

Pressure = 1 x 101.325kPa

= 101.325kPa

Ppmv = 1 x 10-4ppmv

Gas constant, R = 8.3144 L.kPa/mol.K

Concentration in mg/m3 = (1 x 104 * 28 * 101.325)/(8.3144 * 298)

= 1.1451 x 104mg/m3

= 11451.13 mg/m3

3 0
3 years ago
A sample of cast iron with .35 wt%C is slow cooled from 1500C to room temperature. What is the fraction of proeutectoid Cementit
Marizza181 [45]

Answer:

So the fraction of proeutectoid cementite is 44.3%

Explanation:

Given that

cast iron with 0.35 % wtC and we have to find out fraction of proeutectoid cementite phase when cooled from 1500 C to room temperature.

We know that

Fraction of  proeutectoid cementite phase gievn as

{w_p}'=\dfrac{{C_o}'-0.022}{0.74}

Now by putting the values

{w_p}'=\dfrac{0.35-0.022}{0.74}

{w_p}'=0.443

So the fraction of proeutectoid cementite is 44.3%

6 0
2 years ago
A building window pane that is 1.44 m high and 0.96 m wide is separated from the ambient air by a storm window of the same heigh
sdas [7]

Answer:

the rate of heat loss by convection across the air space = 82.53 W

Explanation:

The film temperature

T_f = \frac{T_1+T_2}{2} \\\\= \frac{20-10}{2}\\\\= \frac{10}{2}\\\\= 5^0\ C

to kelvin = (5 + 273)K = 278 K

From  the " thermophysical properties of gases at atmospheric pressure" table; At T_f = 278 K ; by interpolation; we have the following

\frac{278-250}{300-250}= \frac{v-11.44(10^{-6})}{15.89(10^{-6})-11.44(10^{-6})}  → v 13.93 (10⁻⁶) m²/s

\frac{278-250}{300-250}= \frac{k-22.3(10^{-3}}{26.3(10^{-3}-22.3(10^{-3})} → k = 0.0245 W/m.K

\frac{278-250}{300-250}= \frac{\alpha - 15.9(10^{-6})}{22.5(10^{-6}-15.9(10^{-6})} → ∝ = 19.6(10⁻⁶)m²/s

\frac{278-250}{300-250}= \frac{Pr-0.720}{0.707-0.720} → Pr = 0.713

\beta = \frac{1}{T_f} \\=\frac{1}{278} \\ \\ = 0.00360 \ K ^{-1}

The Rayleigh number for vertical cavity

Ra_L  = \frac{g \beta (T_1-T_2)L^3}{\alpha v}

= \frac{9.81*0.00360(20-(-10))*0.06^3}{19.6(10^{-6})*13.93(10^{-6})}

= 8.38*10^5

\frac{H}{L}= \frac{1.44}{0.06} \\ \\= 24

For the rectangular cavity enclosure , the Nusselt number empirical correlation:

Nu_L = 0.42(8.38*10^5)^{\frac{1}{4}}(0.713)^{0.012}(24){-0.3}

NU_L= \frac{hL}{k}= 4.878

\frac{hL}{k}= 4.878

\frac{h*0.06}{0.0245}= 4.878

h = \frac{4.878*0.0245}{0.06}

h = 1.99 W/m².K

Finally; the rate of heat loss by convection across the air space;

q = hA(T₁ - T₂)

q = 1.99(1.4*0.96)(20-(-10))

q = 82.53 W

3 0
3 years ago
Please read the short case at the end of Chapter 8, "Mary Barra of General Motors Values Culture". Use the following prompts to
Tom [10]

Answer: Incoherent question

Explanation: This is an act of plagiarism at subjecting the tutor to unnecessary stress at answering the purported question.

4 0
3 years ago
On a CNC lathe, which of the following axes specifies the distance of the cutting tool from the workpiece centerline?
kvasek [131]

Answer:

The axis of motion that is parallel to the spindle axis is always the Z-axis.

Explanation:

Z-Axis Which axis is which depends on the orientation of the spindle.

If the spindle is vertical (Figure 2.1), the Z-axis is vertical. Either the quill or the knee of a vertical spindle mill will move when a Z-axis command is executed.

This is the best answer I could give you, maybe you could show us a pic of the question so we see all the possible choices?

8 0
2 years ago
Other questions:
  • The 30-kg gear is subjected to a force of P=(20t)N where t is in seconds. Determine the angular velocity of the gear at t=4s sta
    9·1 answer
  • Water is flowing at a rate of 0.15 ft3/s in a 6 inch diameter pipe. The water then goes through a sudden contraction to a 2 inch
    6·1 answer
  • The value of the critical Reynolds number for the flow over a flat plate is 5 x10^5. The significance of the value is:
    13·1 answer
  • A police officer in a patrol car parked in a 70 km/h speed zone observes a passing automobile traveling at a slow, constant spee
    6·1 answer
  • WHAT IS THE MOST POWERFUL PART IN A CAR
    13·2 answers
  • Nêu đặc điểm của tín hiệu PAM rời rạc dạng lưỡng cực NRZ, RZ
    11·1 answer
  • PLEASE HELP WITH THIS ASAP! Thanks
    6·1 answer
  • In a wheatstone bridge three out of four resistors have of 1K ohm each ,and the fourth resistor equals 1010 ohm. If the battery
    5·1 answer
  • Which packet-forwarding method does a router use to make switching decisions when it is using a forwarding information base and
    5·1 answer
  • Explain how smart materials can be used by manufacturers to improve health and safety for children's products and goods.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!