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
Consider a hypothetical microprocessor generating 16-bit addresses with 16-bit data accesses (i.e. each access retrieves 16 bits
Vlad [161]
A. number of addresses is 65536
b. memory capacity is 128 kbytes or 131072 bytes
c. The last memory address is FFFF which is 65535

8 0
3 years ago
Three IT Companies. Help me please!
GuDViN [60]

Answer:

Apple, Samsung and Foxconn

Explanation:

They are the leading it companies today

3 0
2 years ago
Read 2 more answers
Which of the following would allow for the QUICKEST restoration of a server into a warm recovery site in a case in which server
adelina 88 [10]

Answer: C. Differential backup

Explanation: There are several ways od ensuring the preservation and storage of data even cases of disaster, one of such ways is data data mirroring which allows data to be replicated or copied in real time and several backup options. In cases where there there is need to restore a server, the warm recovery site provides a data or disaster recovery option used to mitigate the effect of data loss on organization. In the absence of data mirroring, differential backup option, provides the quickest recovery option as it only requires changes in the data stored after the last full backup. These speed experieced should be expected due to the relatively low data been dealt with rather than the entire data.

5 0
3 years ago
Kali, a python programmer is using the turtle module to write the word hello, which code should she use to indicate the location
natta225 [31]

Answer:

D. # pick up the turtle and move it to (-100,200)

Explanation:

goto() option lets the user to move to a particular location.

so, goto(-100, 200) picks up the turtle and moves to the starting location will be used to indicate location to begin writing the word.

7 0
2 years ago
Read 2 more answers
Two or more computers connected together is referred to as a(n)
son4ous [18]
Two or more computers connected together is referred to as a network.
So the answer is <span>B. network.</span>
8 0
3 years ago
Other questions:
  • As a ______________ you must be able to show that you know what to do to keep food safe
    15·1 answer
  • The _____ search algorithm searches a list for a given item, starting with the first element and continues to compare the item w
    12·1 answer
  • Size of the information in each field of the database
    12·1 answer
  • -Convert the 1's complement 10111010 to decimal
    15·2 answers
  • Well the last week has been kind of terrible...
    9·2 answers
  • Software que busca, detecta y elimina malware tipo espía; puede instalarse en la computadora de manera aislada o en conjunto con
    11·1 answer
  • How do news organizations primarily create revenue?
    12·2 answers
  • ASAP BRAINLIEST!!!
    6·1 answer
  • Leon wants an output from his tablet. What should he look at?
    9·1 answer
  • Sara wants to set up her lights to turn on when she arrives home. She has heard that she might be able to do this using IoT. Wha
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!