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
An angle is observed repeatedly using the same equipment and procedures producing the data below:35 ∘ 40'00",35 ∘ 40'10",35 ∘ 40
Helen [10]

Answer: (a) +/- 7.5° (b) +/- 3.75°

Explanation:

See attachment

6 0
3 years ago
1 pts
kherson [118]
Vibrations felt through the floor are due to unbalanced wheels. It would most likely be rear because if it’s the front the steering whee would also vibrate
3 0
3 years ago
How do you get A's in school
soldier1979 [14.2K]
By being attentive in classes, taking good notes and making sure to put time fourth into your grades.
5 0
3 years ago
Read 2 more answers
Alternating current lesson 4 exam
zloy xaker [14]
Huh? whats the question?
6 0
3 years ago
Air enters a compressor at a pressure of 74.7 kPa and 287 K and leaves at 622 kPa and 579 K. The air flow rate is 50 kg/s. Calcu
vampirchik [111]

Answer:

attached below

Explanation:

7 0
3 years ago
Other questions:
  • Indicate on a tensile curve such quantities as yield stress, Young's modulus, UTS, toughness, point of necking, point of fractur
    7·1 answer
  • If 5000 N of thrust is acting to the left, and 4300 N of drag is acting to the right, what is the magnitude and direction of the
    11·1 answer
  • The solid cylinders AB and BC are bonded together at B and are attached to fixed supports at A and C. The modulus of rigidity is
    6·1 answer
  • Most of the world’s mixed economies are a combination of a __________ economy and a __________ economy.
    9·2 answers
  • The traffic lights are not functioning.
    7·1 answer
  • • Differentiate between laboratory and industrial reactors​
    11·1 answer
  • Which of the following best describes the basic purpose of the internet?
    7·2 answers
  • Calculate the number of vacancies per cubic meter for some metal, M, at 783°C. The energy for vacancy formation is 0.95 eV/atom,
    11·1 answer
  • The team needs to choose a primary view for the part drawing. Three team members make suggestions:
    10·1 answer
  • A sprinter reaches his maximum speed in 2.5sec from rest with constant acceleration. He then maintains that speed and finishes t
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!