subject

1. What is the output of the following code? sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)

2. What is the output of the following code
aList = ["PYnative", [4, 8, 12, 16]]
print(aList[0][1])
print(aList[1][3])

3. What is the output of the following list operation
sampleList = [10, 20, 30, 40, 50]
print(sampleList[-2])
print(sampleList[-4:-1])

4. What is the output of the following list operation
aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])

5. What is the output of the following list assignment
aList = [4, 8, 12, 16]
aList[1:4] = [20, 24, 28]
print(aList)
[4, 20, 24, 28, 8, 12, 16]
[4, 20, 24, 28]

6. What is the output of the following list function?
sampleList = [10, 20, 30, 40, 50]
sampleList. append(60)
print(sampleList)

sampleList. append(60)
print(sampleList)

7. What is the output of the following
aList = [5, 10, 15, 25]
print(aList[::-2])
[15, 10, 5]
[10, 5]
[25, 10]

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
Does the query hawaiian photographers fully meets results?
Answers: 1
question
Computers and Technology, 24.06.2019 22:10
Function name: poly parameters: int returns: int description: a polynomial of degree n with coefficients a0,a1,a2,a3, . . ,an is the function p(x) = a0+a1x+a2x2+a3 ∗ x3+ . . +an ∗ xn this function can be evaluated at different values of x. for example, if: p(x) = 1+2x+ x2, then p(2) = 1+2 ∗ 2+22 = 9. if p(x) = 1+x2+x4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, a3, . . , an of a polynomial p(x) and a value x. the function will return poly(x), which is the value of the polynomial when evaluated at x.
Answers: 3
question
Computers and Technology, 25.06.2019 09:50
The mips architecture has a register set that consists of 32-bit registers. is it possible to design a computer architecture without a register set? if so, briefly describe the architecture, including the instruction set. what are advantages and disadvantages of this architecture over the mips architecture?
Answers: 3
You know the right answer?
1. What is the output of the following code? sampleList = [10, 20, 30, 40]
del sampleList[0:...
Questions
question
Mathematics, 11.04.2021 06:00
question
Mathematics, 11.04.2021 06:00
question
Mathematics, 11.04.2021 06:00
question
Mathematics, 11.04.2021 06:00
Questions on the website: 13722361