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
gulaghasi [49]
3 years ago
11

2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for

these specifications: (a) An expression that evaluates to the index of the middle element of lst (b) An expression that evaluates to the middle element of lst (c) A statement that sorts the list lst in descending order (d) A statement that removes the first number of list lst and puts it at the end 2.25 Add a pair of parentheses to each expression so that it evaluates to True. (a) 0 == 1 == 2 (b) 2 + 3 == 4 + 5 == 7 (c) 1 < -1 == 3 > 4 For each expression, explain i
Computers and Technology
1 answer:
miskamm [114]3 years ago
3 0

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

You might be interested in
Tim Berners-Lee cultivated a way to interconnect and self-index data. He made a major contribution to the development of the Int
anastassius [24]
Answer: D. Digital data
6 0
2 years ago
Lynn has created a quarterly sales report using a word processor. The document is confidential, and Lynn wants to secure it with
sweet-ann [11.9K]
Stop cheating



It’s b
3 0
2 years ago
All the processing-of work-done on a computer is performed by the what?
Nat2105 [25]
It's computed by the processor
6 0
3 years ago
How to calculate 3 X (50 + 40) ÷ 5 on excel 2016
kozerog [31]

Answer:

I think this might help, don't know much of this

Explanation:

How do you calculate 3.5 increase in Excel?

How To Increase a Number By a Percentage. If want to calculate a percentage increase in Excel (i.e. increase a number by a specified percentage), this can be done by simply multiply the number by 1 + the percentage increase. - which gives the result 60.

8 0
3 years ago
Read 2 more answers
Choices.
Svet_ta [14]

Answer:

1. B

2. D

3. C

4. A

5. B

Explanation:

1. To check the integrity of your hard disk and fix various file system errors, the Windows utility which should be implemented is Check disk (Chkdsk). This utility is always used with the command line interface (CLI) with the command "chkdsk."

2. An event or action took place and it caused damage to data, hardware, software and processing capability of the computer. From the statement given, security risks are being described. Any event or action that is capable of causing a problem to a computer system is considered to be a security risk and should be prevented through the use of an appropriate utility software.

3. Virus is a software program that can infect, damage and disrupts the whole computer system.

4. To protect the whole computer system, the software utility which is needed is an Anti-virus.

5. To avoid losing valuable data to your computer, the most important thing to do is to regularly back-up your files.

7 0
2 years ago
Other questions:
  • When approved for a loan, an individual essentially applied for aid in the area of...
    15·1 answer
  • When one block is executed after another block in order from top to bottom, this is called ______ (see picture) Question 31 opti
    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
  • There are several methods of updating information and data on a webserver. We must consider who performs those updates upfront w
    9·2 answers
  • ________ is installed into special, read-only memory of devices like printers and print servers or devices used for various type
    13·1 answer
  • Suppose company A wants to develop a program that duplicates the functionality of a programm by company B. Describe how company
    8·1 answer
  • Eniac was the first desktop computer. t/f
    5·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • Peripeteia is also referred to as __________.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!