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
A 11-cm-diameter horizontal jet of water with a velocity of 40 m/s relative to the ground strikes a flat plate that is moving in
Reika [66]

Answer:

F = 8552.7N

Explanation:

We need first our values, that are,

V_{jet} = 40m/s\\V_{Plate} = 10m/s \\D = 11cm

We start to calculate the relative velocity, that is,

V_r = V_{jet}-V_{plate}\\V_r = (40)-(10)\\V_r = 30m/s

With the relative velocity we can calculate the mass flow rate, given by,

\dot{m}_r = \rho A V_r

\dot{m}_r = (1000)(30) \frac{\pi (0.11)^2}{4}

\dot{m}_r = 285.09kg/s

We need to define the Force in the direction of the flow,

\sum\vec{F} = \sum_{out} \beta\dot{m}\vec{V} - \sum_{in} \beta\dot{m} \vec{V}\\

F = \dot{m}V_r

F = (285.09Kg/s)(30)

F = 8552.7N

8 0
3 years ago
Calculate the load, PP, that would cause AA to be displaced 0.01 inches to the right. The wires ABAB and ACAC are A36 steel and
Nataly [62]

Answer:

P = 4.745 kips

Explanation:

Given

ΔL = 0.01 in

E = 29000 KSI

D = 1/2 in  

LAB = LAC = L = 12 in

We get the area as follows

A = π*D²/4 = π*(1/2 in)²/4 = (π/16) in²

Then we use the formula

ΔL = P*L/(A*E)

For AB:

ΔL(AB) = PAB*L/(A*E) = PAB*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AB) = (2.107*10⁻⁶ in/lbf)*PAB

For AC:

ΔL(AC) = PAC*L/(A*E) = PAC*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AC) = (2.107*10⁻⁶ in/lbf)*PAC

Now, we use the condition

ΔL = ΔL(AB)ₓ + ΔL(AC)ₓ = ΔL(AB)*Cos 30° + ΔL(AC)*Cos 30° = 0.01 in

⇒  ΔL = (2.107*10⁻⁶ in/lbf)*PAB*Cos 30°+(2.107*10⁻⁶ in/lbf)*PAC*Cos 30°= 0.01 in

Knowing that   PAB*Cos 30°+PAC*Cos 30° = P

we have

(2.107*10⁻⁶ in/lbf)*P = 0.01 in

⇒  P = 4745.11 lb = 4.745 kips

The pic shown can help to understand the question.

5 0
3 years ago
Windmills slow the air and cause it to fill a larger channel as it passes through the blades. Consider a circular windmill with
Scilla [17]

Answer:

DIAMETER  = 9.797 m

POWER = \dot W = 28.6 kW

Explanation:

Given data:

circular windmill diamter D1 = 8m

v1 = 12 m/s

wind speed = 8 m/s

we know that specific volume is given as

v =\frac{RT}{P}

  where v is specific volume of air

considering air pressure is 100 kPa and temperature 20 degree celcius

v =  \frac{0.287\times 293}{100}

v = 0.8409 m^3/ kg

from continuity equation

A_1 V_1 = A_2 V_2

\frac{\pi}{4}D_1^2 V_1 = \frac{\pi}{4}D_1^2 V_2

D_2 = D_1 \sqrt{\frac{V_1}{V_2}}

D_2 = 8 \times \sqrt{\frac{12}{8}}

D_2 = 9.797 m

mass flow rate is given as

\dot m = \frac{A_1 V_1}{v} = \frac{\pi 8^2\times 12}{4\times 0.8049}

\dot m = 717.309 kg/s

the power produced \dot W = \dot m \frac{ V_1^2 - V_2^2}{2} = 717.3009 [\frac{12^2 - 8^2}{2} \times \frac{1 kJ/kg}{1000 m^2/s^2}]

\dot W = 28.6 kW

8 0
3 years ago
░░░░░░░░░░░░░░░░░░░▄▀▐░░░▌
allsm [11]

Answer:

wow

Explanation:

that's so cute!!!!!!!!

3 0
2 years ago
Find At Least Three Instances Of Set Constructions In Your CS Courses And Use Them To Exhibit All Set Operations Discussed In Cl
hoa [83]

An expertly designed format for arranging, processing, accessing, and storing data is called a data structure.

Data structures come in both simple and complex forms, all of which are made to organize data for a certain use. Users find it simple to access the data they need and use it appropriately thanks to data structures. The organizing of information is framed by data structures in a way that both machines and people can better grasp. A data structure may be chosen or created in computer science and computer programming to store data in order to be used with different methods. In some circumstances, the design of the data structure and the algorithm's fundamental operations are closely related. Each data structure comprises information about the data values, relationships between the data and — in some situations — functions that can be applied to the data. For instance, in an object-oriented programming language, the data structure and its related methods are tied together as part of a class description. Although they may be designed to operate with the data structure in non-object oriented languages, these functions are not considered to be a part of the data structure. A data structure may be chosen or created in computer science and computer programming to store data in order to be used with different methods. In some circumstances, the design of the data structure and the algorithm's fundamental operations are closely related. Each data structure comprises information about the data values, relationships between the data and — in some situations — functions that can be applied to the data.

Know more about data structure here:

brainly.com/question/29487957

#SPJ4

4 0
1 year ago
Other questions:
  • A pressure gage connected to a tank reads 50 psi at a location where the barometric reading is 29.1 inches Hg. Determine the abs
    6·1 answer
  • Consider a voltage v = Vdc + vac where Vdc = a constant and the average value of vac = 0. Apply the integral definition of RMS t
    7·1 answer
  • What are the units or dimensions of the shear rate dv/dy (English units)? Then, what are the dimensions of the shear stress τ= μ
    14·1 answer
  • The cross-section of a rough, rectangular, concrete() channel measures . The channel slope is 0.02ft/ft. Using the Darcy-Weisbac
    8·1 answer
  • What are 5 advantages of wood as a manufacturing or construction​
    12·1 answer
  • A 200-gr (7000 gr = 1 lb) bullet goes from rest to 3300 ft/s in 0.0011 s. Determine the magnitude of the impulse imparted to the
    10·1 answer
  • The controlled variable in a closed-loop system is the direction of a robot arm. Initially, it is at 50o; then it is commanded t
    12·1 answer
  • one number is 11 more than another number. find the two number if three times the larger number exceeds four times the smaller n
    14·1 answer
  • Please read and an<br><br> 3. Many Jacks use hydraullc power.<br> A) O True<br> B) O False
    13·1 answer
  • What are the horizontal structures beneath a slab that help transfer the load from the slab to the columns?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!