Question 6
Review the following code, written in Python. What are the contents of variable a?
- 'cat', 'dog', 'bird', 'violet'
- 'dandelion', 'rose', 'cat', 'violet', 'bird', 'dog'
- 'violet', 'rose', 'dandelion'
- 'cat', 'dog', 'bird'
Question 7
When the following program `question.py` is executed with Python what is the output?
- 10
- 5
- FunctionOverride: function i assigned not called
- <function i at 0xb7489764>
Question 8
What is the output of the following line of code typed into a Python interactive session? >>> print(bin(0b101010 ^0b111000))
- 0b10101
- 18
- 0b10010
- 0b101101
Question 9
Which of the following would produce this list? [65, 66, 67, 68]
- range(1,4) + 64
- for x(4)+64
- map(ord, ג€ABCDג€)
- range(4)+ 65
Question 10
What is the output of the ls (TCP) function?
- It lists all of the TCP port numbers in a TCP stream
- It lists all of the packets that have a TCP layer
- It lists the contents of the TCP layer
- It lists all of the fields associated with the TCP layer