Leads4pass > GIAC > GIAC Certifications > GPYC > GPYC Online Practice Questions and Answers

GPYC Online Practice Questions and Answers

Questions 4

Given that mylist = [1,3,2,1,4,5,3] how do you remove all occurrences of the number 1 from the list in Python?

A. mylist=[x for x in mylist if x! = 1]

B. mylist.remove(l, mylist.count(1))

C. mylist.replace(1,"")

D. mylist. remove(1)

Buy Now
Questions 5

What does the attacker do in a SQL Injection attack?

A. Obtains an administrative login for a SQL database server

B. Finds and exploits CVSS-SIG vulnerabilities in a particular version of SQL database

C. Inject information into an SQL server via an undocumented administrative interface

D. Submits a string that is interpreted as a SQL database command

Buy Now
Questions 6

After calling a subprocess in a Python program, the program returns an error code of "0". What does this indicate?

A. The subprocess did not run

B. The subprocess terminated with no errors

C. The subprocess entered an infinite loop condition

D. The subprocess encountered a race condition

Buy Now
Questions 7

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

Buy Now
Questions 8

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

Buy Now
Questions 9

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

Buy Now
Questions 10

What is the output of the following command typed in Python interactive mode?

A. SyntaxError: invalid syntax

B. True

C. False

Buy Now
Questions 11

Review the following code:

What is the output of this code?

A. blue

B. red blue

C. red blue yellow

D. red

Buy Now
Questions 12

A gif file has the following attributes:

Extension: .gif

Magic value for start of file: \x47\x49\x46

Magic value for end of file: \x3b

A small data file called "raw_data" contains one gif.

Which of the following statements is most likely to successfully extract the file?

A. reiindall(r\-\gif,raw_data)[0]

B. re.match(r'('.gif )"',raw_data).group(1)

C. re.search('\x47\x49\x46(')\x3b',raw_data)

D. re.findall(r'\x47\x49\x46.-\x3b,,raw_data,re.DOTALL)[0]

Buy Now
Questions 13

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

>>> print (~100)

A. ~100

B. -101

C. 100

Buy Now
Exam Code: GPYC
Exam Name: GIAC Python Coder (GPYC)
Last Update: Jan 06, 2025
Questions: 75
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99