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
valkas [14]
3 years ago
9

There is a file of a few Sean Connery movies on the internet. Each entry has the following form:

Computers and Technology
1 answer:
natulia [17]3 years ago
3 0

Answer:

filename = input("Enter file name: ")

movie_container = list()

with open(filename, "r") as movies:

   content = movies.readlines()

   for movie in content:

       holder = movie.split("\t")

       movie_container.append((holder[0], holder[1], holder[2], holder[3]))

movie_container = sorted(movie_container, key= lambda movie: movie[0])

for movie in movie_container:

   movie_stars = movie[3].split(",")

   name_split = [names.split(" ") for names in movie_stars]

   movie_stars.clear()

   name_split = sorted(name_split, key= lambda names: names[1])

   for name in name_split:

       full_name = " ".join(name)

       print( full_name)

       movie_stars.append(full_name)

   movie[3] = movie_stars

print(movie_container)

Explanation:

The python code uses the open function to open and read in the input file from the standard user prompt. The title of the movies and the stars are all sorted alphabetically and display at the output.

You might be interested in
When entering numbers that start with a zero, apply the _____ number format.
yuradex [85]

Answer:

The Answer is gonna be D. Zero decimal

3 0
2 years ago
Which of the following are incorrect? Group of answer choices An interface can contain constructors. You may declare a final abs
spin [16.1K]

Answer:

Explanation:

1. The answer is No, interface cannot have constructors. ... In order to call any method we need an object since there is no need to have object of interface, there is no need of having constructor in interface (Constructor is being called during creation of object).

2.A final class is considered complete and can not be subclassed (It's methods can not be overridden ). In case of abstract class, we have to proved implementation to abstract methods in subclasses. A final class can not have abstract methods and an abstract class can not be declared final.

3.private constructors are acceptable, however the class should be marked final instead, as doing so means the class is to be extended.

4.Yes! Abstract classes can have constructors! Yes, when we define a class to be an Abstract Class it cannot be instantiated(i.e an object cannot be created) but that does not mean an Abstract class cannot have a constructor. Each abstract class must have a concrete subclass which will implement the abstract methods of that abstract class.

6 0
3 years ago
Read 2 more answers
What does the Send Backward icon allow a publisher to do?
lianna [129]

Answer:

It reverts to the original image

Explanation:

6 0
3 years ago
Read 2 more answers
In which area is composing for games different from composing for movies?
kondaur [170]

Answer: royalties earned

Explanation:

In areas such as the looping scores, temp tracks and adaptive scores, there are similarities when composing for games and when composing for movies.

The area where there is difference when composing for games and composing for movies is the royalties earned. The interest that is earned on royalties for both cases are different.

8 0
3 years ago
An important part of the development of transport is safety. how can you, when you get around in different ways, contribute to m
nika2105 [10]

Answer:

I need help I don't get a this questions please asap?

Explanation:    Head-on collisions. Some simple solutions can help to reduce the risk of head-on crashes. ...

   Run-off road crashes. This is when a vehicle collides with a stationary object, such as a sign or lamppost, after leaving the road. ...

   Intersection crashes. ...

   Vulnerable road users. ...

   Much work to be done.

Aug 31, 2018

8 0
3 years ago
Other questions:
  • A(n) __________ window is an open window hidden from view but that can be displayed quickly by clicking the window's program but
    7·1 answer
  • Why is Brainly always deleting either my answers or my questions? I am putting nothing inappropriate in them. Can someone answer
    7·2 answers
  • Take some time to do some research about small businesses in your area. Select one and using HTML design a simple site that educ
    11·1 answer
  • What inspired john logie baird to create the television?
    11·1 answer
  • Help me please! (*18* points!)
    5·1 answer
  • Which term is defined by the total operating current of a circuit?
    9·1 answer
  • ONlY OnE pErcEnT oF pEOpLe CaN sOlvE tHiS!
    7·2 answers
  • Jon wants to assign a value to the favorite food variable: favoriteFood! = "Pizza" but gets an error message. What does he need
    9·2 answers
  • Give an example of what Artificial Intelligence application most popular is used on a daily basis.
    12·2 answers
  • Disadvantages of a grain crusher
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!