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
How do you identify all sensors, functions, and where we can use them?
Alex17521 [72]

Sensor/Detectors/Transducers are electrical, opto-electrical, or electronic devices composed of specialty electronics or otherwise sensitive materials, for determining if there is a presence of a particular entity or function. Many vehicles including cars, trains, buses etc. all use sensors to monitor oil temperature and pressure, throttle and steering systems and so many more aspects.

7 0
3 years ago
What steps would you take to design an improved toothpaste container?
algol [13]

Answer:

A. Identify the need, recognize limitations of current toothpaste containers, and then brainstorm ideas on how to improve the existing

Explanation:

To design an improved toothpaste container, we must identify the needs of the customer, one of the major need is to make the container attractive to the sight. This is the first thing that will prompt a customer to wanting to buy the product (The reflectance/appearance).

Then recognize the limitation of the current design, what needed change. This will help in determining what is needed to be included and what should be removed based on identified customers need.

The last step is to brainstorm ideas on how to improve the existing designs. Get ideas from other colleagues because there is a saying that two heads are better than one. This will help in coming to a reasonable conclusion on the new design after taking careful consideration of people's opinion.

7 0
3 years ago
Match the scenario to the term it represents.
Ann [662]

Answer:

i nrfvewv

Explanation:

3 0
3 years ago
Force = 33 newtons
kicyunya [14]

Answer:

answer

Explanation:

4 0
3 years ago
If you are driving a 30-foot
Ratling [72]

Answer:

3 sec

If you are driving a 30-foot vehicle at 55 mph, how many seconds of following distance should you allow? 30ft truck. = 3 sec. Since the truck is over 40 mph.

Explanation:

5 0
3 years ago
Other questions:
  • Argon is compressed in a polytropic process with n=1.2 from 120 kPa and 10 °C to 800 kPa in a piston cylinder device. Determine:
    11·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
  • What must you do if hauling a load of material which could fall or blow onto the roadway?
    14·1 answer
  • What does CADCAM stand for ?
    10·2 answers
  • A 220-V electric heater has two heating coils that can be switched such that either coil can be used independently or the two ca
    15·1 answer
  • A bolt is tightened, subjecting its shank to a tensile stress of 80 kpsi and a torsional shear stress of 50 kpsi at a critical p
    7·1 answer
  • 1. Springs____________<br> energy when compressed<br> And _________energy when they rebound.
    12·1 answer
  • The diameter of a cylindrical water tank is Do and its height is H. The tank is filled with water, which is open to the atmosphe
    11·1 answer
  • A heat pump with refrigerant-134a as the working uid is used to keep a space at 25C by absorbing heat from geothermal water that
    5·1 answer
  • For many clients, a decision is based primarily on time and money, which are the two most abundant
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!