List and Print Elements.
Here's a possible implementation of the program in Python:
python
Copy code
nums = [56, 25, -28, -5, 11, -6]
print("First element:", nums[0])
print("Last element:", nums[-1])
The output of the program would be:
sql
Copy code
First element: 56
Last element: -6
In this program, we first define a list named nums using an initializer list with the given set of numbers. Then, we use indexing to access the first and last elements of the list and print them to the console. Note that in Python, negative indices can be used to access elements from the end of the list, so nums[-1] refers to the last element of the list.
ChatGPT