AICPA PCEP-30-01 Questions & Answers

Full Version: 40 Q&A


Latest PCEP-30-01 Exam Questions and Practice Tests 2024 - Killexams.com

Latest PCEP-30-01 Practice Tests with Actual Questions


Get Complete pool of questions with Premium PDF and Test Engine


Exam Code : PCEP-30-01
Exam Name : Certified Entry-Level Python Programmer
Vendor Name :
"AICPA"








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:

  1. def

  2. function

  3. 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?

  1. z

  2. x

  3. y

  4. 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]

  1. can be executed if and only if the tuple contains at least two elements

  2. is illegal

  3. may be illegal if the tuple contains strings

  4. 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)

  1. a + ((b * c) – d)

  2. 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)

  1. TRUE

  2. True

  3. true

  4. 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?


  1. for i in range(0, 5): print(str(i) * 5)

  2. for i in range(1, 6): print(str(i) * 5)

  3. for i in range(1, 6): print(i, i, i, i, i)

  4. 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)

"""


"""


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.

The digraph written as #! is used to:

  1. tell a Unix or Unix-like OS how to execute the contents of a Python file.

  2. create a docstring.

  3. make a particular module entity a private one.

  4. 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: Zoria*****

I am very satisfied with the pcep-30-01 Questions and Answers provided by Killexams.com, as it helped me significantly during the exam. I plan to use their materials for other AICPA certifications in the future.
User: Mila*****

If you want to savor the sweet taste of victory, go to killexams.com and prepare for your PCEP-30-01 exam. I did the same before my test and was pleased with the service provided. The facilities at killexams.com are perfect, and once you are in, you will not have to worry about failing. I passed my exam and did pretty well, and so can you. Give it a try!
User: Joseph*****

Thanks to a great friend of mine who recommended killexams.com questions and answers, I was able to score 88% on my PCEP-30-01 exam. All the material provided was wonderful, and although getting enrolled for the exam was simple, the actual test proved to be quite challenging. However, with the help of killexams.com, I was able to pass with ease and continue with my career.
User: Ruby*****

Passing the PCEP-30-01 exam was challenging for me, and I struggled to understand some of the topics. However, killexams.com questions and answers helped me comprehend these subjects and enabled me to complete my preparation in just ten days. I am grateful for the excellent guide provided by killexams.com and highly recommend it to anyone preparing for the PCEP-30-01 exam.
User: Mickey*****

I have passed my PCEP-30-01 exam with Killexams.com questions and answers. This website is 100% reliable, and most of the questions were similar to what I received in the exam. Although I missed some questions, I still managed to pass with top scores. My recommendation is to memorize everything you get on your training p.c. from Killexams.com because that is all you need to pass the PCEP-30-01 exam.

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