You are on page 1of 4

1.

Determine the output of the following code:

a. 0 95
b. 87 95
c. 87 67
2. Suppose list1 is [2445,133,12454,123], what is max(list1)?
a. 12454
b. 2445
c. 133
3. Determine the output of the following code:

a. hellohellohello
b. hello, hello, hello
c. hello hello hello

4. Allocate 300 to the vertical index (row) 1 and the horizontal index (column) 1

Answer: __list[1][1] = 300?___________________

5. Default parameters should be assigned to all variables or from the last variable in the
order of appearance of the parameters
a. true
b. false
6. Fill the gaps “By using _____ ________ expression we create two-dimensional list
with a single line code”
a. Line implication
b. List comprehension
c. Line addition
7. What is used to count the number of cases in which a dice is rolled twice?
a. Count_set function
b. Sum method
c. Product_set function
8. Is position of arguments important when keyword arguments are used?

a. Yes
b. No

9. Which method used in codes bellow?

Answer: string method _

10. What for symbol “&” is used in a set?


a. intersection
b. union
c. symmetric difference
11. Advantages of function:
I. Code readability is decreased
II. It is possible to reuse functions in other programs
III. Maintenance is easy
a. I and II
b. II and III
c. III and I
12. You control the output order by assigning the required integer value within the
placeholder
a. True
b. False
13. Determine the output of the following code:
a. 55
b. 66
c. 11

14. Determine output of given code:

Answer: _____3____________

15. Which of the following is an immutable data type?


a. int
b. list
c. dict
16. What is true about assignment operation?
a. In a list it is not a way of copying and passing values
b. In a list it is a way of copying and passing values
c. In function it is a way of copying and passing values
???
17. What will be the output of the following code:

Answer: ______False__________

18. Which will result “false”


a. In operator: returns false if the member is in present
b. Both are mistake
c. In not operator: returns false if is not in present
19. Multiple values are saved in a sequence inside those data structures. What are this
data structures?
a. Dictionary, String, Def
b. Dictionary, String, Range
c. List, Tuple, Range

20. Why mistake occurs?

a. Among the sequence data types, + operator cannot link the range objects
b. Among the sequence data types should be in separate brackets
c. Range of Python methods is not variable

You might also like