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
almond37 [142]
3 years ago
13

write code that removes the first and last elements from a list stored in a variable named my_list. assume that the list has bee

n initialized and contains at least two elements.
Computers and Technology
1 answer:
MakcuM [25]3 years ago
8 0

Answer:

[24, 35, 9, 56 Approach #3: Swap the first and last element is using tuple variable.

You might be interested in
Diligent people are as concerned with the ____ as the ___ of their work
Ksivusya [100]

Answer:

Duration; quality/correctness.

Explanation:

Diligence is a way of life. It adds value to a piece of work. When a work is diligently done, it is said to be good or almost perfect. A diligent work evaluates all errors and corrects them from start to finish.

A diligent person takes time to analyse and complete a task to perfection. But diligence also comes with speed. A diligent work as to meet up with deadlines. Diligent people are also as concerned with the speed or duration of their work as to the correctness and quality.

5 0
2 years ago
Which of the following is not a property of a WAN:
docker41 [41]

Answer:

Option d is the correct answer for the above question.

Explanation:

  • WAN is a type of network that facilities network connection all over the world. It can connect every computer which is in anywhere in the world while the other technology like LAN and MAN is used for small area locations.
  • The above question asked that about that statement which is not the property of WAN and that is option d because it states that WAN is used to connect only small areas of computers, but it can connect all the computers of the world, while the other property is valid for WAN.
6 0
3 years ago
The following code accomplishes which of the tasks written below? Assume list is an int array that stores positive int values on
worty [1.4K]

Answer:

it stores the largest value in list (the maximum) in foo

Explanation:

Initially foo is assigned as the first element of the list

Inside the loop, every element in the list will be compared with foo, starting from the second element. If an element is greater than foo, the new value of the foo will be that element. At the end of the loop, foo will be equal to the largest element in the list.

5 0
3 years ago
Create the following SQL Server queries that access the Northwind database. Place them in a zip file and place the zip file in t
neonofarm [45]

Answer:

1. SELECT e.EmployeeID, e.FirstName, e.LastName, COUNT(*) as OrderByEmployee FROM Employees e

JOIN Orders o

ON e.EmployeeID = o.EmployeeID

WHERE YEAR(o.OrderDate) = '1996'

GROUP BY e.EmployeeID,e.FirstName,e.LastName

ORDER BY OrderByEmployee DESC

2. SELECT o.OrderID,c.CustomerID, o.OrderDate,SUM((od.Quantity)*

od.UnitPrice - od.Discount)) as TotalCost FROM Orders o

JOIN [Order Details] od

ON od.OrderID = o.OrderID

JOIN Customers c

ON o.CustomerID = c.CustomerID

WHERE (MONTH(OrderDate)= 7 OR MONTH(OrderDate) = 8) and

YEAR(OrderDate) = 1996

GROUP BY o.OrderID,c.CustomerID, o.OrderDate

ORDER BY TotalCost DESC

3. SELECT c.CustomerID, c.CompanyName, c.City, COUNT(o.OrderID) as TotalOrder, SUM(od.Quantity* od.UnitPrice) as TotalOrderAmount FROM Customers c

JOIN Orders o

ON o.CustomerID = c.CustomerID

JOIN [Order Details] od

ON od.OrderID = o.OrderID

WHERE c.Country = 'USA'

GROUP BY c.CustomerID, c.CompanyName, c.City

ORDER BY c.City, c.CustomerID

4. SELECT c.CustomerID, c.CompanyName, c.City, COUNT(o.OrderID) as TotalOrder, SUM(od.Quantity* od.UnitPrice) as TotalOrderAmount FROM Customers c

JOIN Orders o

ON o.CustomerID = c.CustomerID

JOIN [Order Details] od

ON od.OrderID = o.OrderID

WHERE c.Country = 'USA'

GROUP BY c.CustomerID, c.CompanyName, c.City

HAVING COUNT(o.OrderID) > 3

ORDER BY c.City, c.CustomerID

5. SELECT p.ProductID, p.ProductName, s.ContactName as SupplierName, MAX(o.OrderDate) as LastOrderDateOfProduct FROM Products p

JOIN Categories c

ON c.CategoryID = p.CategoryID

JOIN Suppliers s

ON s.SupplierID = p.SupplierID

JOIN [Order Details] od

ON od.ProductID = p.ProductID

JOIN Orders o

ON o.OrderID = od.OrderID

where c.CategoryName = 'Grains/Cereals'

GROUP BY p.ProductID, p.ProductName, s.ContactName

ORDER BY SupplierName, p.ProductName

6. SELECT p.ProductID, p.ProductName, Count(DISTINCT c.CustomerID ) as OrderByThisManyDistinctCustomer

FROM Products p

JOIN [Order Details] od

ON od.ProductID = p.ProductID

JOIN Orders o

ON o.OrderID = od.OrderID

JOIN Customers c

ON c.CustomerID = o.CustomerID

where YEAR(o.OrderDate) = 1996

GROUP BY p.ProductID, p.ProductName

Explanation:

The six query statements returns data from the SQL server Northwind database. Note that all the return data are grouped together, this is done with the 'GROUP BY' Sql clause.

8 0
3 years ago
printArray is a function that has two parameters. The first parameter is an array of element type int and the second is an int,
Illusion [34]

Answer:

printArray(inventory, n);

Explanation:

The question doesn't specify in which language this has to be done, here's a generic call then... so if it's aimed at a specific language, some minor adjustments might be needed to respect the proper syntax/structure of that specific language.

Given:

printArray: function name, using 2 parameters.

inventory: array of ints

n : integer, number of items in array inventory

The call to the function would be:

printArray(inventory, n);

7 0
3 years ago
Other questions:
  • Attention merchants define
    5·1 answer
  • Which functions are performed by server-side code??​
    10·1 answer
  • How many questions must you answer in Brainly to be able to message people?
    6·2 answers
  • William found out that someone used his report on American culture without his permission. What is William a victim of? A. plagi
    7·2 answers
  • What color is the smartart tolls tab?
    5·1 answer
  • __________ is the order of arrangement of files and folders.
    6·1 answer
  • List three different sets of keywords that could be used to search for information on how to
    15·1 answer
  • What is the code for this please?​
    13·1 answer
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    8·1 answer
  • One word for The characters typed by a user using a<br> keyboard.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!