Which of the following is the final output when program.py is executed with a Python Interpreter?
Answer : C
What is the output when the following commands are typed in Python interactive mode?
Answer : A
A multi-byte character encoded with UTF-8 has the first byte 11001101. What will the next byte begin with?
Answer : C
Review the lines of code below. Which of the following actions will they perform?
Answer : A
Review the following code:
Answer : A
What is the output of the following line of code typed into a Python interactive session?
>>> print (~100)
Answer : B
What is the output of the following line of code typed into a Python interactive session?
>>> print (int(ג€1111ג€,2))
Answer : D
What does the ג€enumerateג€ function return when applied to a list?
Answer : A
A connection between a python raw socket server and a netcat client is being made over port 1100 on the same computer. The last command in the Python terminal is:
>>> connection,remoteip=pyserver.accept()
In the netcat terminal the following 2 lines were typed:
# nc 127.0.0.1 1100 This is a test
What needs to be typed in the python terminal to display the input from the netcat session?
Answer : D
Review the following code:
Answer : C
When using the Python ג€socketsג€ module, which of the following calls is used to transmit data to a specific IP address?
Answer : B
What would be the string resulting from the following command, considering the string variable ג€gpycג€?
Answer : D
Using the Python ג€socketsג€ module, which of the following functions looks up the IP address of www.giac.org?
Answer : D
Explanation:
It must be socket.gethostbyname(ג€www.giac.orgג€)
How many bytes are used to store a 16 bit Unicode character?
Answer : C
What is the output of the following line of code typed into a Python interactive session?
Answer : A
Have any questions or issues ? Please dont hesitate to contact us