PFP191 Exam Questions And Answers
|Latest 2025 | Guaranteed Pass
What is python?
A. a code
B. nothing
C. a game
D. a programming language - Answer✔D. a programming language
Which of the following variables is the "most mnemonic"?
A. x
B. x1q3z9ocd
C. hours
D. variable_173 - Answer✔C. hours
1
, ©FYNDLAY 2025 ALL RIGHTS RESERVED 12:36 PM A+
Which data structure is being put to use in the code given below?
# Code starts
org = 'QuizOrbit'
count = {}
for i in org:
if i in count:
count[i]+=1
else:
count[i]=1
print(count)
# Code Ends
A. String
B. List
C. Tuple
D. Dictionary - Answer✔D. Dictionary
2
, ©FYNDLAY 2025 ALL RIGHTS RESERVED 12:36 PM A+
Which Of The Following Define The Set {'a', 'b', 'c'}:
A. s = {'a', 'b', 'c'}
B. s = set('a', 'b', 'c')
C. s = set('abc')
D. s = set(['a', 'b', 'c'])
E. s = {('a', 'b', 'c')} - Answer✔A. s = {'a', 'b', 'c'}
C. s = set('abc')
D. s = set(['a', 'b', 'c'])
What Python expression tests whether the string 'foo' is a member of set s? - Answer✔'foo' in s
You have a set s defined as follows:
s = {100, 200, 300}
Which one of the following statements does not correctly produce the union of s and the set
{300, 400, 500}:
A. s | [300, 400, 500]
3
, ©FYNDLAY 2025 ALL RIGHTS RESERVED 12:36 PM A+
B. s | {300, 400, 500}
C. s | ({300, 400, 500})
D. s | set([300, 400, 500])
E. s.union([300, 400, 500])
F. s.union(set([300, 400, 500])) - Answer✔A. s | [300, 400, 500]
What is the result of this statement:
{'b', 'a', 'r'} & set('qux')
A. {'b', 'r', 'a'}
B. {'q', 'r', 'x', 'u', 'b', 'a'}
C. {}
D. set() - Answer✔D. set()
What is the result of this statement:
{1, 2, 3, 4, 5} - {3, 4} ^ {5, 6, 7}
4