AICPA PCEP-30-01 Questions & Answers

Full Version: 40 Q&A



PCEP-30-01 Dumps
PCEP-30-01 Braindumps
PCEP-30-01 Real Questions
PCEP-30-01 Practice Test
PCEP-30-01 Actual Questions


AICPA
PCEP-30-01
Certified Entry-Level Python Programmer
https://killexams.com/pass4sure/exam-detail/PCEP-30-01
Question: 34
A function definition starts with the keyword:
A. def
B. function
C. fun
Answer: A
Explanation:
Topic: def
Try it yourself:
def my_first_function():
print(‘Hello’)
my_first_function() # Hello
https://www.w3schools.com/python/python_functions.asp
Question: 35
Consider the following code snippet:
w = bool(23)
x = bool(”)
y = bool(‘ ‘)
z = bool([False])
Which of the variables will contain False?
A. z
B. x
C. y
D. w
Answer: B
Explanation:
Topic: type casting with bool()
Try it yourself:
print(bool(23)) # True
print(bool(”)) # False
print(bool(‘ ‘)) # True
print(bool([False])) # True
The list with the value False is not empty and therefore it becomes True
The string with the space also contain one character
and therefore it also becomes True
The values that become False in Python are the following:
print(bool(”)) # False
print(bool(0)) # False
print(bool(0.0)) # False
print(bool(0j)) # False
print(bool(None)) # False
print(bool([])) # False
print(bool(())) # False
print(bool({})) # False
print(bool(set())) # False
print(bool(range(0))) # False
Question: 36
Assuming that the tuple is a correctly created tuple,
the fact that tuples are immutable means that the following instruction:
my_tuple[1] = my_tuple[1] + my_tuple[0]
A. can be executed if and only if the tuple contains at least two elements
B. is illegal
C. may be illegal if the tuple contains strings
D. is fully correct
Answer: B
Explanation:
Topics: dictionary
Try it yourself:
my_tuple = (1, 2, 3)
my_tuple[1] = my_tuple[1] + my_tuple[0]
# TypeError: ‘tuple’ object does not support item assignment
A tuple is immutable and therefore you cannot
assign a new value to one of its indexes.
Question: 37
You develop a Python application for your company.
You have the following code.
def main(a, b, c, d):
value = a + b * c – d
return value
Which of the following expressions is equivalent to the expression in the function?
A. (a + b) * (c – d)
B. a + ((b * c) – d)
C. None of the above.
D. (a + (b * c)) – d
Answer: D
Explanation:
Topics: addition operator multiplication operator
subtraction operator operator precedence
Try it yourself:
def main(a, b, c, d):
value = a + b * c – d # 3
# value = (a + (b * c)) – d # 3
# value = (a + b) * (c – d) # -3
# value = a + ((b * c) – d) # 3
return value
print(main(1, 2, 3, 4)) # 3
This question is about operator precedence
The multiplication operator has the highest precedence and is therefore executed first.
That leaves the addition operator and the subtraction operator
They both are from the same group and therefore have the same precedence.
That group has a left-to-right associativity.
The addition operator is on the left and is therefore executed next.
And the last one to be executed is the subtraction operator
Question: 38
Which of the following variable names are illegal? (Select two answers)
A. TRUE
B. True
C. true
D. and
Answer: B, D
Explanation:
Topics: variable names keywords True and
Try it yourself:
TRUE = 23
true = 42
# True = 7 # SyntaxError: cannot assign to True
# and = 7 # SyntaxError: invalid syntax
You cannot use keywords as variable names.
Question: 39
Which of the following for loops would output the below number pattern?
11111
22222
33333
44444
55555
A. for i in range(0, 5):
print(str(i) * 5)
B. for i in range(1, 6):
print(str(i) * 5)
C. for i in range(1, 6):
print(i, i, i, i, i)
D. for i in range(1, 5):
print(str(i) * 5)
Answer: B
Explanation:
Topics: for range() str() multiply operator string concatenation
Try it yourself:
for i in range(1, 6):
print(str(i) * 5)
"""
11111
22222
33333
44444
55555
"""
print(‘———-‘)
for i in range(0, 5):
print(str(i) * 5)
"""
00000
11111
22222
33333
44444
"""
print(‘———-‘)
for i in range(1, 6):
print(i, i, i, i, i)
"""
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5 5 5 5
"""
print(‘———-‘)
for i in range(1, 5):
print(str(i) * 5)
"""
11111
22222
33333
44444
"""
You need range (1, 6)
because the start value 1 is inclusive and the end value 6 is exclusive. To get the same numbers next to each other
(without a space between them) you need to make a string and then use the multiply operator string concatenation
The standard separator of the print() function is one space. print(i, i, i, i, i) gives you one space between each number.
It would work with print(i, i, i, i, i, sep=”) but that answer is not offered here.
Question: 40
The digraph written as #! is used to:
A. tell a Unix or Unix-like OS how to execute the contents of a Python file.
B. create a docstring.
C. make a particular module entity a private one.
D. tell an MS Windows OS how to execute the contents of a Python file.
Answer: A
Explanation:
Topics: #! shebang
This is a general UNIX topic.
Best read about it here:
https://en.wikipedia.org/wiki/Shebang_(Unix)

User: Lara*****

I scored 92% in my pcep-30-01 exam today, and I credit my success to killexams.com. Their questions are relevant, and the data is accurate. This is the first time I used their services, but I am confident that I will return to this website for all of my pcep-30-01 certification exams. Thank you, killexams.com, for being my primary preparation aid.
User: Larry*****

Overall, killexams.com was a terrific way for me to prepare for the pcep-30-01 exam. While not all the questions on the exam were 100% similar to what killexams.com provided, over 70% of them were equal, and the rest were very similar. Even with killexams.com, Its still essential to analyze and use your brain, but I managed to pass the exam, so I consider it a great result.
User: Yaroslav*****

With just 12 days left to prepare for the PCEP-30-01 exam, I was feeling overwhelmed until I discovered killexams.com. Their Questions and Answers were concise and easy to understand, which helped me to finish them within 15 days. I scored 88% on the actual PCEP-30-01 exam, and 90% of the questions were similar to the sample papers that killexams.com provided. I am grateful for their help and support.
User: Verochka*****

For the pcep-30-01 exam, I depended on the questions and answers provided by Killexams.com, and it delivered what I wished. I retained all that I needed to, and my marks of 92% were agreeable, contrasting with my 1-week struggle. Thanks to Killexams.com for their assistance, and their aid was not hard for me to understand as well.
User: Nurul*****

I am writing this to express my gratitude to Killexams.com for helping me pass the pcep-30-01 exam with a 96% score. Their test bank series is excellent as it gives a real feel of an online exam and provides detailed explanations for each question in easy-to-understand language. I am more than satisfied with my choice of buying their test series.

Features of iPass4sure PCEP-30-01 Exam

  • Files: PDF / Test Engine
  • Premium Access
  • Online Test Engine
  • Instant download Access
  • Comprehensive Q&A
  • Success Rate
  • Real Questions
  • Updated Regularly
  • Portable Files
  • Unlimited Download
  • 100% Secured
  • Confidentiality: 100%
  • Success Guarantee: 100%
  • Any Hidden Cost: $0.00
  • Auto Recharge: No
  • Updates Intimation: by Email
  • Technical Support: Free
  • PDF Compatibility: Windows, Android, iOS, Linux
  • Test Engine Compatibility: Mac / Windows / Android / iOS / Linux

Premium PDF with 40 Q&A

Get Full Version

All AICPA Exams

AICPA Exams

Certification and Entry Test Exams

Complete exam list