Cyber Monday Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

GIAC GPYC - GIAC Python Coder (GPYC)

Page: 2 / 3
Total 75 questions

A programmer includes the following line in his program. What does this enable him to do?

from scapy. all import *

A.

Run brute-force password attempts against a local service

B.

Encrypt Python code using a private key

C.

Read and manipulate network packets

D.

Check imported code for malicious behavior

When the following program "question.py" is executed with Python what is the output?

A.

10

B.

5

C.

FunctionOverride: function i assigned not called

D.

Function i at 0xb7489764>

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

A.

11

B.

01

C.

10

D.

00

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

A.

15

B.

NameError: name 'c' is not defined

C.

ac

D.

TypeError: cannot concatenate 'str' and 'int' objects

Review the following Python code:

A.

'Jones','Johnson'

B.

"Brown'/Williams'

C.

'Brown'/Jones','Johnson','Williams'

D.

'Johnson'/JohnsonVWilliams'/Jones'/Jones'/Brown'

What is the output of the following program when executed with the Python Interpreter?

A.

SyntaxError: invalid syntax

B.

25

C.

20

D.

15

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

>>>print (8 <<1)

A.

False

B.

16

C.

SyntaxError: invalid syntax

D.

True

An operator able to perform bitwise shifts is coded as (select two answers)

A.

- -

B.

++

C.

<<

D.

>>

What is the cause of the error shown below?

A.

A syntax error

B.

The re module hasn't been imported

C.

A bad file name

D.

The stdin module hasn't been imported

How many bytes are used to store a 16 bit Unicode character?

A.

3

B.

4

C.

2

D.

1