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
Who the heck is bts?!?!!!???​
Lana71 [14]

Answer:

they are a k-pop boy band.

6 0
3 years ago
Read 2 more answers
What is the purpose of a web server? What is the purpose of a web browser?
Sauron [17]

Answer: the purpose of a web browser is to help answer and needed questions, and to get to sites.

Explanation:

4 0
2 years ago
What is the dark, sticky substance that forms when tobacco is burned?
sashaice [31]

Answer: Tar.

Explanation:

A chemical substance made when tobacco is burned. Tar contains most of the cancer-causing and other harmful chemicals found in tobacco smoke. When tobacco smoke is inhaled, the tar can form a sticky layer on the inside of the lungs.

7 0
2 years ago
9. Question
Gennadij [26K]
A server stopped provide service to 100 users
5 0
2 years ago
Lactic acid (ch3ch(oh)cooh) has one acidic hydrogen. a 0.10 m solution of lactic acid has a ph of 2.44. calculate ka.
sammy [17]

The answer is : Ka=0.000137

HA -> H+ + A-

0.10 x x

0.10-x +x +x

[H+]= 10^-2.44 = 0.00363

x= 0.00363

(0.00363)(0.00363)/(0.10-0.00363) = 0.000137

Ka=0.000137

5 0
3 years ago
Other questions:
  • ____ are systems in which queues of objects are waiting to be served by various servers
    5·1 answer
  • What is the relationship between ionic bonds and cleavage
    13·1 answer
  • In what stage of an algae or fungi life cycle are they able to reproduce spores?
    10·1 answer
  • In the language of the World Wide Web, "this page cannot be displayed" means A. your computer's software is damaged. B. the ISP
    10·2 answers
  • when files on storage are scattered throughout different disks or different parts of a disk, what is it called
    10·1 answer
  • Which of the following is an advantage of using
    6·2 answers
  • John typed 545 words in 35 minutes, what is his typing speed
    8·2 answers
  • b. Write a complete program for the following situation related to setting the speed of a car to preset values before starting a
    5·1 answer
  • Una laptop agarra mas internet que una computadora de escritorio?
    11·1 answer
  • Hey everyone please let my friends answer please?????? .
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!