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
You want to securely erase data from your hard drive what can you use to do this and what is the process called
tankabanditka [31]
You could Factory Reset a computer or you could smash it with  a hammer
7 0
2 years ago
Read 2 more answers
Why is it grey? i recently dropped it , the switch is on!
iragen [17]

Answer:

because it is what it is

7 0
3 years ago
Which storage con be used<br>as permanent storage<br>a) Rom<br>6) RAM, © main memery​
Veseljchak [2.6K]

Answer:

ROM

Explanation:

Data in ROM does not erase itself when the computer is shut down. The data is permentely written and stored.

4 0
2 years ago
The do-while loop is a __________ loop that is ideal in situations where you always want
belka [17]
your answers are all D
4 0
3 years ago
Systena Solutions Inc. contracts Anenta Software Inc. to develop advanced anti-malware software. In order to serve its new custo
Kryger [21]

This is an example of <u>b2b</u> customer service.

<u>Explanation:</u>

B2b customer service is the customer service which stands for business to business. It refers to the sale that you make to the business instead of an individual consumers.

B2b customer experiences include creating a personalized. omni channel experience and building lasting relationships while providing convenient, digital solutions.

6 0
2 years ago
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • To easily add an organizational chart to a document, users should select _____. SmartArt Text Boxes Shapes Clip Art
    8·2 answers
  • The source must decode a message before it can be sent. select one: <br> a. True <br> b. False
    7·1 answer
  • Who can provide you with a new password when you have forgotten your old one?
    14·2 answers
  • To add a new kind of information into the database you need to add a new table<br> true or false?
    7·2 answers
  • 100 tickets are sold in a raffle with one prize. John has 8 tickets, Jamie has 10 tickets, find the probability that John wins
    11·2 answers
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • Application software can run without the presence of system software true or false ​
    5·1 answer
  • Do you think JNK should be more ethical?
    6·1 answer
  • 4. Contoso, Ltd. has a vigorous Office 365 and Azure cloud-service presence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!