MIDTERM_JARED Flashcards
is one of the most popular programming languages. Although it
is a general-purpose language, it is used in various areas of applications
such as Machine Learning, Artificial
Python
is a very popular general-purpose interpreted, interactive,
object-oriented, and high-level programming language.
Python
It
was created by ___________ during ______
Guido van Rossum , 1985- 1990.
development began in the late__________ while he was working at the
________ & Informatica (CWI), a computer science research
institute in the Netherlands.
1980s, Centrum Wiskunde
One of the key factors contributing to Python’s popularity is its concise
set of keywords.
Python is Easy to learn
Python comes with a cool interactive tool called a “shell.” It’s like
having a chat with Python itself! When you open the Python shell, it
shows a friendly»_space;> prompt.
Python is Interactive
This functionality is supported by venv module in standard Python
distribution.
Create new Virtual Environment
is a name used to identify a variable, function,
class, module or other object. An identifier starts with a letter A to Z
or a to z or an underscore (_) followed by zero or more letters,
underscores and digits (0 to 9).
Python Identifiers
start with an uppercase letter. All other
identifiers start with a lowercase letter.
Python Class names
private identifier.
starts with a single leading underscore
Python programming provides no braces to indicate blocks of code for
class and function definitions or flow control. Blocks of code are
denoted by line indentation, which is rigidly enforced. All statements
within the block must be indented
Python Lines and Indentation
is a programmer-readable explanation or annotation in the
Python source code. They are added with the purpose of making the
source code easier for humans to understand, and are ignored by
Python interpreter
comment
Data items belonging to different data types are stored in computer’s
memory. Computer’s memory locations are having a number or
address, internally represented in binary form. Data is also stored in
binary form as the computer works on the principle of binary
representation.
Python Variables
First letter is a lowercase, but first letter of each
subsequent word is in uppercase.
Camel case
First letter of each word is in uppercase.
Pascal case
Use single underscore (_) character to separate words.
Snake case
represents a kind of value and determines what operations
can be done on it
Data type
Any data item having a numeric value is a number.
Number Type
Four
standard number data types in Python.
integer, floating point,
Boolean and Complex.
is a collection data type.
Sequence
three sequence
types defined in Python.
String, List and Tuple.
is a sequence of one or more Unicode characters, enclosed in
single, double or triple quotation marks (also called inverted commas).
string
is an ordered collection of any type of data items. Data
items are separated by comma (,) symbol and enclosed in square
brackets ([]). A list is also a sequence, hence.
List
is an ordered collection of any type of data items.
Data items are separated by comma (,) symbol and enclosed in
parentheses or round brackets ().
Tuple