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
When water precipitates from the sky, runs off downhill along the ground, or infiltrates down into the soil, its gravitational p
agasfer [191]

Answer:

Geothermal energy.

Explanation:

Geothermal energy is called a renewable energy source because the water is replenished by rainfall, and the heat is continuously produced by the earth.

8 0
3 years ago
Where do greywater pipes generally feed into?
Mekhanik [1.2K]

Answer:

c   Waste stack

Explanation:

7 0
3 years ago
What is the weight density of a 2.24 in diameter titanium sphere that weights 0.82 lb?
nasty-shy [4]

Answer:

0.14\ lb/in^{3}

Explanation:

Density is defined as mass ler unit volume, expressed as

\rho=\frac {m}{v}

Where m is mass, \rho is density and v is the volume. For a sphere, volume is given as

v=\frac {4\pi r^{3}}{3}

Replacing this into the formula of density then

\rho=\frac {m}{\frac {4\pi r^{3}}{3}}

Given diameter of 2.24 in then the radius is 1.12 in. Substituting 0.82 lb for m then

\rho=\frac {0.82}{\frac {4\pi 1.12^{3}}{3}}=0.13932044952427\approx 0.14 lb/in^{3}

4 0
3 years ago
True or false. Part of the mission of the NTSB is to determine the probable cause of an accident
eimsori [14]

uniform

welcome 2 Ghana African state western region

6 0
3 years ago
Why do y'all boys be so toxic and fake?
AVprozaik [17]

Answer: I'm a boy, but I'm not toxic or fake

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • ¿Cuál era probablemente el activo más valioso de Persia?
    10·2 answers
  • Consider the following program:
    15·1 answer
  • Heat in the amount of 100 kJ is transferred directly from a hot reservoir at 1200 K to a cold reservoir at 600 K. Calculate the
    15·1 answer
  • A process engineer performed jar tests for a water in order to determine the optimal pH and dose using alum. A test was conducte
    13·1 answer
  • You are preparing to work with Chemical A. You open the appropriate storage cabinet, and notice Chemical B, as well as Chemical
    9·1 answer
  • The rate at which velocity changes is called?
    5·2 answers
  • The radial component of acceleration of a particle moving in a circular path is always:________ a. negative. b. directed towards
    9·1 answer
  • Heyyyyyyyyy people wrud
    7·1 answer
  • What is the gear ratio of the given train
    6·1 answer
  • Birdie Par owns a company that makes golf gloves. She is thinking about introducing a new glove, which would require an addition
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!