You are on page 1of 4

1.

Select the true statement about the set


a. Sets are unordered
b. sets are written with curly brackets {}
c. set object does support indexing
2. Determine the output of the following code:

a. 7
b. 4
c. 8
3. Is it possible using negative index?
a. Yes
b. Only by using {}
c. No
4. Finish the code bellow

Answer: print(s1 ! s2)

5. Identify number of remaining seats


a. 12
b. 18
c. 6

6. What is the output of following: set([1,1,2,3,4,2,3,4])


a. {1,1,2,3,4,2,3,4}
b. [1,1,2,3,4,2,3,4]
c. {1,2,3,4}
7. What is the difference between list and dictionary?
a. Dictionary has a key related to the value
b. Destiny of two functions
c. List is data structure to save vales
8. What does the “pop” method do?
a. returns the list
b. deletes the last item
c. adds item to the list
9. Determine the output of the following code:

a. 55
b. 66
c. 44
10. What is true about next codes?
a. In the result of all three code TypeError appear
b. In all of them logical expression is used
c. They all give same result
11. What is function?
a. set of codes that performs a specific operation within a program
b. number of modules that performs a specific operation within a program
c. operations that are used on conditional statements
12. Which of the following is not the correct syntax for creating a set?
a. set((1,2,3,4))
b. set([1,2,2,3,4])
c. set([[1,2],[3,4]])
13. What is indexing?
a. Approaching to the data value by using the item index
b. Specifying initial value
c. Collecting defamiliarized information by indexes

14. Determine output of code below:

Output: [1,2,3]

15. Determine the output of the following code:

a. [11, 22, 33, 44, 55, 66]


b. [11, 22, 33, 44, [55, 66]]
c. Error

16. Comprehension expression allows to create a list concisely and afficiently


a. True
b. False

17. What should be in square brackets?


[ ]

a. 0
b. 1
c. 1, 2, 3
18. Is it possible to make set from tuple?
a. Yes
b. No
19. No restrictions are applied to the data types to be included in the list
a. True
b. False

20. Complete the code below

Answer:_________zip________

You might also like