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
A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
Ierofanga [76]

Answer:

ToolBox.

Explanation:

A label control may be added to a form by double-clicking on the Label control icon in the ToolBox window.

5 0
3 years ago
How can forms help us reduce data-entry errors?
Lisa [10]

Answer:

 Forms help to reduce the data entry errors by the following ways as follows:

  • As, forms are designed in a more user friendly way. So that it is easy to understand to the users and it also increases the accuracy of the information.
  • In forms, very particular sections of information are divided into different section so it reduces the complexity and result into less data entry error.
  • Forms automatically validate the data or information efficiently that is filled by the users. So, that is why there is less number of changes of errors while data entry.  
5 0
3 years ago
Stuart wants to delete some text from a slide. What should Stuart do?
WITCHER [35]
Go to the slide and use backspace to delete the text. He answer is A.
3 0
3 years ago
What is the relationship between a method and a function
Sauron [17]

Answer:

Method and a function are the same,whit the different terms. A method is a procedure or function in object - oriented programming. A function is a group of reusable code which can be called anywhere in your program. This eliminates the need for writing the some code again and again.

7 0
3 years ago
Read 2 more answers
When an instrument in the dashboard of your car informs you the air pressure in the right rear tire is low, what type of compute
inessss [21]

Answer:

embedded computer

Explanation:

Based on the information provided within the question it can be said that the computer that determines this is called an embedded computer. This is a microprocessor-based system that is uniquely designed in order to perform a single specific task. Once it does so, it saves the information and can be used in a much larger system such as a car dashboard system.

4 0
3 years ago
Other questions:
  • How do forensic pathologist determine time of death
    13·1 answer
  • The term ________ refers to the use of a single unifying device that handles media, Internet, entertainment, and telephone needs
    7·1 answer
  • How much health did a supply drop balloon originally have??
    7·2 answers
  • If you turn on the Lock alpha button , what happens
    5·2 answers
  • ____ includes any attempt to intentionally conduct dishonest activities online.
    5·1 answer
  • How do you copy and paste plz let me know
    14·2 answers
  • I need help with workplace safety systems please help
    10·1 answer
  • Which of these expressions is used to check whether num is equal to value?
    13·1 answer
  • Which of the following is an example of group dynamics?
    8·1 answer
  • How many pages is 1500 words double spaced 12 font?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!