Python PCEP Questions with complete solution Python PCEP
python - correct answer not meant for low level programming
emphasizes code readability
works in any environment
lots of libraries
many frameworks
interpreter - correct answer -reads from top to bottom, left to right, with ex...
Python PCEP
python - correct answer ✔not meant for low level programming
emphasizes code readability
works in any environment
lots of libraries
many frameworks
interpreter - correct answer ✔-reads from top to bottom, left to right, with
exceptions
-performs instruction validation
-results returned per instruction, in sequential order
-can be run from CLI using py or installed in the IDE
-execution takes more time. instruction needs to be compiled real time.
-code can be executed in any environment
-code is needed each time the program is executed
compiler - correct answer ✔-takes more time but code execution is faster
-code is compiled for a specific operating system
-source code is typically unavailable and compiled data can be read
-once binary code is compiled, source code no longer needed
python 2 - correct answer ✔legacy code
older libraries not forward-compatible
ASCII
rounds calc to nearest whole number
,print "hello"
python 3 - correct answer ✔new in 2020
strings in unicode
calcs not auto rounded
print ("Hello")
python types - correct answer ✔-cpython original
-jython designed to run on Java platform
-ironpython an implementation of python integrated with .net platform
installation process - correct answer ✔windows - installed in the AppData
directory
download from python site
interpreter launched from CLI either by py or python3
IDE - correct answer ✔integrated development environment
program dedicated to specific software development
easier than CLI
pycharm
IDLE - correct answer ✔integrated development and learning environment
2 main windows: shell and editing
cross platform works on windows, unix, and macOS
pycharm - correct answer ✔simple windows installation with some config
, allows virtual environment to manage all project settings
console informs developer if there are mistakes
string - correct answer ✔a sequence of characters enclosed in quotation
marks
integer - correct answer ✔All whole numbers (both positive and negative)
and zero.
float - correct answer ✔A native type representing rational numbers to limited
precision. Real numbers. decimals.
boolean - correct answer ✔A single value of either TRUE or FALSE. yes/no
hashtag - correct answer ✔renders a line a comment #this is a comment
(""") - correct answer ✔used in the beginning and end of a multiline
comments
"""
This is,
a docstring
comment
"""
(" " ) - correct answer ✔used in print ( )
print("Hello World")
#prints Hello World
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 flyhigher329. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.99. You're not tied to anything after your purchase.