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
Define power supply and types of power supply<br>​
emmainna [20.7K]

Answer:

hope you like it

Explanation:

Two types of power supplies exist, DC-DC and AC-DC. DC-DC power supplies allow you to plug in electrical devices into car outlets or similar sources that supply direct current, or DC, power. These power supplies are not the most commonly used, though.

Classification of Power Supply and Its Different Types

OUTPUT = DC OUTPUT = AC

INPUT = AC Wall wart Bench power supplies Battery charger Isolation transformer Variable AC supply Frequency changer

INPUT = DC DC-DC converter Inverter Generator UPS

4 0
2 years ago
Even closed systems are never perfectly closed. <br>true false​
Oxana [17]

Answer:

True

Explanation:

You can learn through many different textbooks that a closed system is always closed.

3 0
2 years ago
To add a glow effect to WordArt text, which of the following should be done?
g100num [7]
Number 2 is the correct answer
8 0
2 years ago
What command issued from the command prompt will show the route that a packet travels from the issuing computer to another compu
svetoff [14.1K]

Answer:

B)tracert

Explanation:

Tracery Command can be regarded as

network diagnostic tool, it is used in tracking process of pathway of packet ranging from source to destination on IP network. It as well allows to know real time of each hops that are been taken by a packet as it enroutes to it's destination. The traceroute can be run by following these steps:

✓Open the run window

✓Open Command prompt, this can be done by enter "cmd" then enter.

✓ input" tracert" then destination ( Ip address or web address)

It should be noted that Tracery command issued from the command prompt will show the route that a packet travels from the issuing computer to another computer.

6 0
2 years ago
To gain one pound of fat, how many extra calories would you need to consume?
mamaluj [8]
You'll need $3,500 extra calories to gain one pound of fat.

6 0
2 years ago
Other questions:
  • Which of these is a Microsoft certification CCIE PMP PRINCE2 MCSE
    11·1 answer
  • GIVING BRAINLIEST What does output allow a computer to do? Display information Receive information Do complex math problems Do m
    6·2 answers
  • what key aspects did you learn regarding the creation, analysis, and management of information systems? How will this impact you
    5·1 answer
  • What food does swiss eat on christmas?
    10·1 answer
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • Which does plug-and-play refer to?
    14·1 answer
  • Please Answer Quickly.<br> Match the item on the left with the reason that it is false on the right.
    9·1 answer
  • ravi met few peoples in a party and was mixing up well those wearing expensives clothing and fair complexion . which factors are
    9·1 answer
  • Which directory contains the initrd file? in suse linux
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!