Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

PCEP EXAM LATEST EDITION 2023 GUARANTEED GRADE A+

Rating
-
Sold
-
Pages
17
Grade
A+
Uploaded on
06-11-2023
Written in
2023/2024

program The instructions that control computer hardware and make it work. machine language a set of primitive instructions built into every computer. The instructions are in the form of binary code, so you have to enter binary codes for various instructions. Instruction List (IL) The alphabet of a machine language. A complete set of known commands. Different types of computers may vary depending on the size of their _____s, and the instructions could be completely different in different models. natural language Any one of the languages spoken that evolved naturally. high-level programming languages somewhat similar to natural languages in that they use symbols, words and conventions readable to humans. These languages enable humans to express commands to computers that are much more complex than those offered by ILs. source code A program written in a high-level programming language. source file the file containing the source code compilation the source program is translated once (however, this act must be repeated each time you modify the source code) by getting a file (e.g., an .exe file if the code is intended to be run under MS Windows) containing the machine code; now you can distribute the file worldwide; the program that performs this translation is called a compiler or translator. interpretation you (or any user of the code) can translate the source program each time it has to be run; the program performing this kind of transformation is called an interpreter, as it interprets the code every time it is intended to be executed; it also means that you cannot just distribute the source code as-is, because the end-user also needs the interpreter to execute it. error message The interpreter will inform you where the error is located and what caused it. However, these messages may be misleading, as the interpreter isn't able to follow your exact intentions, and may detect errors at some distance from their real causes. advantages of compilation - the execution of the translated code is usually faster; - only the user has to have the compiler - the end-user may use the code without it; - the translated code is stored using machine language, as it is very hard to understand it, your own inventions and programming tricks are likely to remain your secret. advantages of interpretation - you can run the code as soon as you complete it - there are no additional phases of translation; - the code is stored using programming language, not the machine one - this means that it can be run on computers using different machine languages; you don't compile your code separately for each different architecture. disadvantages of compilation - the compilation itself may be a very time-consuming process - you may not be able to run your code immediately after any amendment; - you have to have as many compilers as hardware platforms you want your code to be run on. disadvantages of interpretation - don't expect that interpretation will ramp your code to high speed - your code will share the computer's power with the interpreter, so it can't be really fast; - both you and the end user have to have the interpreter to run your code. interpreted Python is a(n) ________ language. Guido van Rossum Creator of Python Rivals of Python Perl - a scripting language originally authored by Larry Wall, more traditional, more conservative than Python, and resembles some of the good old languages derived from the classic C programming language. Ruby - a scripting language originally authored by Yukihiro Matsumoto. More innovative and more full of fresh ideas than Python. Python itself lies somewhere between these two creations. low-level programming (sometimes called "close to metal" programming): if you want to implement an extremely effective driver or graphical engine, you wouldn't use Python applications for mobile devices although this territory is still waiting to be conquered by Python, it will most likely happen someday. Cython write your mathematical ideas using Python, and when you're absolutely sure that your code is correct and produces valid results, you can translate it into "C". Certainly, "C" will run much faster than pure Python. Jython can communicate with existing Java infrastructure more effectively. This is why some projects find it usable and needful. Note: the current ______ implementation follows Python 2 standards. There is no _______ conforming to Python 3, so far. CPython the reference implementation of the Python programming language. Written in C and Python, ______ is the default and most widely used implementation of the language. Traceback A list of code that was executed just before an exception stopped the program. location of the error the name of the file containing the error, line number and module name content of the erroneous line IDLE's editor window doesn't show line numbers, but it displays the current cursor location at the bottom-right corner; use it to locate the erroneous line in a long source code NameError a short explanation of the error encountered print() function A function used in a program or script that causes the Python interpreter to display a value on its output device. Text must be contained within quotes. function invocation code that calls a function into action function argument passed in for function parameter function(_______) keyword arguments consists of three elements: a keyword identifying the argument; an equal sign (=); and a value assigned to that argument; any keyword arguments have to be put after the last positional argument (this is very important) backslash a special character which announces that the next character has a different meaning, e.g., _n (the newline character) starts a new output line. Positional arguments the ones whose meaning is dictated by their position, e.g., the second argument is outputted after the first, the third is outputted after the second, etc. end=' ' A keyword parameter for the print() function that causes the function to NOT add a newline at the end of the string. sep=' ' keyword parameter for the print() function that causes the function to insert the characters contained between the quotes between arguments literal a ________ is data whose values are determined by the _______ itself string A sequence of characters integer whole numbers floating point numbers non-empty decimal fractions type The characteristic of the numeric value which determines its kind, range, and application underscores *Python 3.6 has introduced _______s in numeric literals, allowing for placing single underscores between digits and after base specifiers for improved readability. This feature is not available in older versions of Python. 0o treats a number as an octal number (print(__123) is equal to 83 0x treats a number as a hexadecimal number (print(__123) is equal to 291 scientific notation in python 3E8 is equal to 3 x 10(8) 6.62607E-34 is equal to 6.62607 x 10(-34) quotes and escapes desired output: I like "Monty Python" print("I like "Monty Python"") or print('I like "Monty Python"') NoneType a special literal that is used in Python to represent the absence of a value operator special symbols or keywords which are able to operate on the values and perform (mathematical) operations, e.g., the operator multiplies two values: x y ** (double asterisk) an exponentiation (power) operator. Its left argument is the base, its right, the exponent * (asterisk) a multiplication operator / (slash) a divisional operator dividend value in front of the slash divisor value behind the slash float The result produced by the division operator is always a _______ // (double slash) an integer divisional operator. results are always rounded (unless the divisor or dividend is a float) floor division The operation that divides two numbers and chops off the fraction part. (another name for integer division) % (modulo) remainder left after the integer division example: print(14 % 4) is equal to 2 + (addition) adds two numbers - (subtraction) subtraction, and can also change the sign of a number right-to-left print(2 * 2 * 3) = 256 This is because exponents are calculated with _____ _____ _____ binding. expression a combination of values (or variables, operators, calls to functions) which evaluates to a value, e.g., 1 + 2 unary operator an operator with only one operand, e.g., -1, or +3 binary operator an operator with two operands, e.g., 4 + 5, or 12 % 5 assignment operator The '=' character causes the compiler or interpreter to evaluate to the expression on its right and store the result in the variable(s) on its left. shortcut operators Operators like x++ which means x = x + 1 or x =y which means x = x y. round() function Changes a value by rounding it to a specific number of decimal places. Example: round(miles_to_kilometers, 2) variable a named location reserved to store values in the memory. A variable is created or initialized automatically when you assign a value to it for the first time. identifier Each variable must have a unique name - an _______. A legal _______ name must be a non-empty sequence of characters, must begin with the underscore(_), or a letter, and it cannot be a Python keyword. The first character may be followed by underscores, letters, and digits. _______s in Python are case-sensitive. dynamically-typed Python is a _______ _______ language, which means you don't need to declare variables in it. To assign values to variables, you can use a simple assignment operator in the form of the equal (=) sign, i.e., var = 1. self-commenting When the variable is name something that describes it's purpose Example: squareArea, totalApples, deaf program A program which doesn't get a user's input String The default result of the input() function is a _______ int() the ________ function takes one argument (e.g., a string: int(string)) and tries to convert it into an integer. If it fails, the whole program will fail too. example: ______(input("Please input a value here: ") float() the _______ function takes one argument (e.g., a string: float(string)) and tries to convert it into a float (the rest is the same). concatenation operator The + sign, used to glue two strings into one. replication operator It replicates the string the same number of times specified by the number. For example: "James" * 3 gives "JamesJamesJames" end a program the input() function can be used to prompt the user to _______ _ _______. Look at the code below: name = input("Enter your name: ") print("Hello, " + name + ". Nice to meet you!") print("nPress Enter to _______ _ _______.") input() print("THE END.") == (equal to) The _______ operator compares the values of two operands. If they are equal, the result of the comparison is True. If they are not equal, the result of the CONTINUED..

Show more Read less
Institution
PCEP
Course
PCEP










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
PCEP
Course
PCEP

Document information

Uploaded on
November 6, 2023
Number of pages
17
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.79
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Allan100 Rasmussen College
View profile
Follow You need to be logged in order to follow users or courses
Sold
646
Member since
5 year
Number of followers
605
Documents
3231
Last sold
2 months ago

3.5

92 reviews

5
36
4
17
3
15
2
5
1
19

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions