100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
PCEP Practice Questions Graded A+ $12.99   Add to cart

Exam (elaborations)

PCEP Practice Questions Graded A+

 5 views  0 purchase
  • Course
  • Ccep
  • Institution
  • Ccep

PCEP Practice Questions

Preview 3 out of 22  pages

  • September 18, 2024
  • 22
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Ccep
  • Ccep
avatar-seller
julianah420
PCEP Practice Questions


What will be the output of the following Python code?
print("Hello")
print ()
print("Dear") - answer Hello

Dear

Select the correct output of the following Python statement:
prin("Hello, World!") - answer no output, an error is displayed on the console

What is the correct output of the statement shown below:
print("Today", "is", "a", "great", "day.") - answerToday is a great day.

Which operations have the highest precedence? (select all that apply)
multiplication
division
subtraction
addition - answer-multiplication
-division

What will be the output of the following Python code?
print("I like\nPython") - answerI like
Python

The 0x prefix means that a number is: - answerhexadecimal

The Python name comes from ________. - answerMonty Python's Flying Circus

Select the correct output of the Python code shown below:
print("Python is\\ngreat.")
print("Python is\\great.") - answerPython is\ngreat.
Python is\great.

Select the correct output for the code snipped shown below.
print("This", "code", "is", "being", end= " ")
print("interpreted.") - answerThis code is being interpreted.

Select the correct output for the code snipped shown below.

,print("This", "code", "is", "being", "interpreted.", sep= "#") -
answerThis#code#is#being#interpreted.

Select the correct statements regarding the following code snippet:
print(4//3*2)

A. The // and * operators use left-side binding
B. The output of this statement is 2.
C. The output of this statement is 0.
D. The // and * operators use right-side binding - answerA. The // and * operators use
left-side binding
B. The output of this statement is 2.

A backslash (\) at the end of a line of Python code tells Python to continue the line of
code on the next line. (T/F) - answerTrue

Select the correct output of the Python code shown below:
print("Python is great")
print("'Python is great'")
print("""Python is great""") - answerPython is great
'Python is great'
Python is great

Select the correct statements regarding the following code snippet:
print(4//3**2)

A. The output of this statement is 0.
B. The ** operator uses right-side binding
C. The output of this statement is 2.
D. The ** operator uses left-side binding - answerA. The output of this statement is 0.
B. The ** operator uses right-side binding

The Python print function allows which type of arguments?

A. All Python data types
B. Numeric arguments only
C. Integer arguments only
D. Strings only - answerA. All Python data types

A tool which executes Python programs one statement at a time as each statement is
read is called a/an ________.

A. compiler
B. debugger
C. translator
D. interpreter - answerD. interpreter

, Select the correct output from the following Python statement:
print(round(7.689, 2))

A. 7.68
B. 7.69
C. 7.7
D. 8 - answerB. 7.69

What does the backslash ( \ ) mean when used in Python strings? Select all correct
statements.

A. The backslash does not have any impact on the code output
B. The backslash tells the console to start a new output line
C. The backslash is called the escape character
D. The backslash is a hint to Python that the next character has a different meaning -
answerC. The backslash is called the escape character

D. The backslash is a hint to Python that the next character has a different meaning

What is the result of the following addition operation:
123 + 0.0

A. cannot be evaluated
B. Type error
C. 123.0
D. 123 - answerC. 123.0

An interpreter is a computer program that directly executes instructions written in a
programming language one at a time without previously compiling them into a machine
language program. (T/F) - answerTrue

Given a print operation with comma-separated arguments similar to the one provided
here, select the correct statements from the choices provided below.

print("This", "is", "a", "test")

A. print() with more than one argument prints an error
B. print() invoked with more than one argument outputs the arguments on separate lines
C. print() invoked with more than one argument outputs the arguments all in one line
D. print() puts a space between output arguments by default - answerC. print() invoked
with more than one argument outputs the arguments all in one line
D. print() puts a space between output arguments by default

Which of the following is a valid file extension for a Python source code file?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller julianah420. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

82956 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.99
  • (0)
  Add to cart