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
Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
andreyandreev [35.5K]

Answer:

input number

calculate modulus of the number and 5

compare outcome to 0

if 0 then output "divisible by 5"

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

5 0
3 years ago
An Organization Chart to support the Appliance Warehouse case study The SWOT Analysis diagram you performed and created to suppo
Ulleksa [173]

<u>Explanation</u>:

Remember, the aim of SWOT Analysis is to perform analysis of a phenomenon or case.

Just as in any analysis it is followed by results and recommendations based on the set rules of the analysis.

<u>The Strengths, Weaknesses, Opportunity identified and Threats can translate to the mission statement </u>of a company. It is important to know that this statement is usually factual and accurate.

3 0
3 years ago
Why did artists use pinhole cameras during the renaissance?
murzikaleks [220]
<span>Pinhole cameras were one of the most sophisticated devices of the period, it made tasks much easier it basically worked exactly like the human eye and is something just like tracing.

Hope it helps! :)</span>
3 0
3 years ago
One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
WINSTONCH [101]

Answer:

F(x) = x*.25

Explanation:

the amount of miles (x) divided by 4 (four quarters in a mile) or just multiply by .25

6 0
3 years ago
Read 2 more answers
A study guide can be created
choli [55]

Answer:

C, Both of these.

Explanation:

You can take notes either way. It's just your preference. Hope this helps :)

7 0
3 years ago
Read 2 more answers
Other questions:
  • Where can you change your web page SafeSearch settings?
    8·1 answer
  • Nadia would like to find text in her current document that differentiates CompanyABC from companyabc. Which option should she us
    8·2 answers
  • Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. When she reads over the pag
    10·1 answer
  • For connection to place on any network you must have a set of standards?<br> O True<br> O False
    8·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Choose a project with a relatively simple description (building a LAN, designing a web page, inventing a new communication devic
    6·1 answer
  • There is a simple pattern for derermining if a binary number is odd. What is it and why does this pattern occur?
    8·1 answer
  • If a small monster collector:- Has 16 small monster containment devices and intends to use all of them.
    10·1 answer
  • How would you describe<br> "analogous color harmony" to a six year old?
    13·1 answer
  • Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value w
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!