GIAC Python Coder v1.0

Page:    1 / 5   
Exam contains 73 questions

Which of the following is the final output when program.py is executed with a Python Interpreter?


  • A. 15
  • B. 5
  • C. 10
  • D. SyntaxError: invalid syntax


Answer : C

What is the output when the following commands are typed in Python interactive mode?


  • A. [ג€˜tag to go tagג€™, ג€˜to sans tagג€™]
  • B. [ג€˜tag to go tagג€™, ג€˜tag to sans tagג€™]
  • C. [ג€˜tag to go tagג€™]
  • D. [ג€˜tag to go tag to sans tagג€™]


Answer : A

A multi-byte character encoded with UTF-8 has the first byte 11001101. What will the next byte begin with?

  • A. 11
  • B. 01
  • C. 10
  • D. 00


Answer : C

Review the lines of code below. Which of the following actions will they perform?


  • A. Pass through proxy connections.
  • B. Save non-http files from pages.
  • C. Keep session information in browser.
  • D. Interact with .js objects.


Answer : A

Review the following code:


What is the output of this code?

  • A. blue
  • B. red blue
  • C. red blue yellow
  • D. red


Answer : A

What is the output of the following line of code typed into a Python interactive session?
>>> print (~100)

  • A. ~100
  • B. -101
  • C. 100


Answer : B

What is the output of the following line of code typed into a Python interactive session?
>>> print (int(ג€1111ג€,2))

  • A. 1111
  • B. 16
  • C. ג€1111ג€
  • D. 15


Answer : D

What does the ג€enumerateג€ function return when applied to a list?

  • A. An object of tuples, with each assigned to an iterative integer
  • B. The memory location of the list
  • C. The total number of items in the list
  • D. A list containing a single tuple, with the tuple containing all items in the original 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?

  • A. Nothing, as the connection is complete
  • B. connection.recv(1024)
  • C. print(remoteip)
  • D. Nothing, port 1100 is too low to bind the python server to


Answer : D

Review the following code:


What is the output?

  • A. (1, 0)
  • B. (1,)
  • C. (256,)
  • D. (\x01, \x00)


Answer : C

When using the Python ג€socketsג€ module, which of the following calls is used to transmit data to a specific IP address?

  • A. sendto
  • B. connect
  • C. bind
  • D. try


Answer : B

What would be the string resulting from the following command, considering the string variable ג€gpycג€?



  • A. nohtyP
  • B. powerful
  • C. engaugnal lufrewop
  • D. lufrewop
  • E. powerful Python


Answer : D

Using the Python ג€socketsג€ module, which of the following functions looks up the IP address of www.giac.org?

  • A. socket.gethostbyaddr(ג€www.giac.orgג€)
  • B. socket.nslookup.www.giac.org
  • C. socket.get(www.giac.org)
  • D. socket.hostbyname(ג€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?

  • A. 3
  • B. 4
  • C. 2
  • D. 1


Answer : C

What is the output of the following line of code typed into a Python interactive session?


  • A. NameError: name ג€˜some_funcג€™ is not defined
  • B. 5
  • C. 5+10
  • D. 15


Answer : A

Page:    1 / 5   
Exam contains 73 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy