These materials are called conductors
Answer:
B. {1, 2, 2, 3, 3, 4, 5}
Explanation:
Given
The above code segment
Required
Determine which list does not work
The list that didn't work is 
Considering options (A) to (E), we notice that only list B has consecutive duplicate numbers i.e. 2,2 and 3,3
All other list do not have consecutive duplicate numbers
Option B can be represented as:
![nums[0] = 1](https://tex.z-dn.net/?f=nums%5B0%5D%20%3D%201)
![nums[1] = 2](https://tex.z-dn.net/?f=nums%5B1%5D%20%3D%202)
![nums[2] = 2](https://tex.z-dn.net/?f=nums%5B2%5D%20%3D%202)
![nums[3] = 3](https://tex.z-dn.net/?f=nums%5B3%5D%20%3D%203)
![nums[4] = 3](https://tex.z-dn.net/?f=nums%5B4%5D%20%3D%203)
![nums[5] = 4](https://tex.z-dn.net/?f=nums%5B5%5D%20%3D%204)
![nums[6] = 5](https://tex.z-dn.net/?f=nums%5B6%5D%20%3D%205)
if (nums.get(j).equals(nums.get(j + 1)))
The above if condition checks for duplicate numbers.
In (B), when the elements at index 1 and 2 (i.e. 2 and 2) are compared, one of the 2's is removed and the Arraylist becomes:
![nums[0] = 1](https://tex.z-dn.net/?f=nums%5B0%5D%20%3D%201)
![nums[1] = 2](https://tex.z-dn.net/?f=nums%5B1%5D%20%3D%202)
![nums[2] = 3](https://tex.z-dn.net/?f=nums%5B2%5D%20%3D%203)
![nums[3] = 3](https://tex.z-dn.net/?f=nums%5B3%5D%20%3D%203)
![nums[4] = 4](https://tex.z-dn.net/?f=nums%5B4%5D%20%3D%204)
![nums[5] = 5](https://tex.z-dn.net/?f=nums%5B5%5D%20%3D%205)
The next comparison is: index 3 and 4. Meaning that comparison of index 2 and 3 has been skipped.
<em>This is so because of the way the if statement is constructed.</em>
Answer:
Explanation: integer is the meaning of int() if you payed attention to programming class, int() would be a WHOLE number and not a decimal number, 2nd of all, a decimal number would be float() so the answer is int() hope i helped!
Explanation:
hope this helped byyyyyyyyyyye
Answer:
Third generation computer use integrated circuit(IC) and it was fast and reliable.
Forth generation computer micro computer were introduced and they were highly reliable and fast.
Answer:
Following show the trace table.
Explanation:
a)
int i = 0; int j = 10; int n = 0;
while (i < j) { i++; j--; n++;
}
i j n
1 9 1
2 8 2
3 7 3
4 6 4
5 5 5
b)
int i = 0; int j = 0; int n = 0;
while (i < 10) { i++; n = n + i + j; j++;
}
i j n
1 1 2
2 2 4
3 3 9
4 4 16
5 5 25
6 6 36
7 7 49
8 8 64
9 9 81
10 10 100
c)
int i = 10; int j = 0; int n = 0;
while (i > 0) { i--; j++; n = n + i - j; }
i j n
9 1 8
8 2 14
7 3 18
6 4 20
5 5 18
4 6 14
3 7 8
2 8 0
1 9 -10
d)
int i = 0; int j = 10; int n = 0; while (i != j) { i = i + 2; j = j - 2; n++; }
i j n
2 8 1
4 6 2
6 4 3
8 2 4
10 0 5
12 -2 6
14 -4 7
... ... ...
... ... ...
... ... ...