ser jared Flashcards

(69 cards)

1
Q

Who created python and when

A

Guido van Rossum during 1985- 1990.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

a very popular general-purpose interpreted, interactive,
object-oriented, and high-level programming language.

A

Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

when was python first introduced

A

1991

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

One of the key factors contributing to Python’s popularity is its concise set of keywords. Python’s appeal lies in its straightforward syntax, the use of indentation to maintain code structure instead of cluttering it with curly brackets, and its dynamic typing, which eliminates the need for prior variable declarations.

A

Python is Easy to learn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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&raquo_space;> prompt. You can type in any math or code stuff
you want, and Python will talk back to you right away.

A

Python is Interactive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Python is a versatile language that can wear many hats when it comes to programming styles. It’s fundamentally object-oriented, which means everything in Python is treated as an object. But here’s the cool part: Python can also act like other types of languages.

A

Python is MultiParadigm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Even though it has a very few keywords (only Thirty Five), Python
software is distributed with a standard library made of large number of modules and packages.

A

Python’s Standard Library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Python’s standard distribution has an excellent graphics library called TKinter. It is a Python port for the vastly popular GUI toolkit called TCL/Tk.

A

Python for GUI Applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Almost any type of database can be used as a backend with the Python application. DB-API is a set of specifications for database driver software to let Python communicate with a relational database.

A

Python’s Database Connectivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Python has become an essential skill for data scientists. Today, real time web applications, mobile applications and
other devices generate huge amount of data.

A

Python for Data Science

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Python libraries like Scikit-learn and TensorFlow are incredibly useful
for creating models that predict things, like figuring out if customers
are happy or guessing what stock prices might do in the future.

A

Python for Machine Learning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Python’s web frameworks, like Django, Pyramid, Flask, and others, are highly favored by web developers because they speed up the process of creating web applications.

A

Python for Web Development

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

OpenCV is a widely popular library for capturing and processing images. Image processing algorithms extract information from images, reconstruct image and video data.

A

Python for Computer Vision and Image
processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Python found one of its first applications in automating CRON
(Command Run ON) jobs. Certain tasks like periodic data backups, can be written in Python scripts scheduled to be invoked automatically by operating system scheduler.

A

Python for Job Scheduling and Automation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

Python Lines and Indentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Python accepts single (‘), double (“) and triple (‘’’ or “””) quotes to
denote string literals, as long as the same type of quote starts and ends
the string.

A

Quotations in Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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.

A

Python Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Python Naming Patterns

A

Camel Case, Pascal Case, and Snake Case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

represents a kind of value and determines what operations
can be done on it

A

Data Types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Any data item having a numeric value is a number. There are Four
standard number data types in Python.

A

Number Type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A string is a sequence of one or more Unicode characters, enclosed in
single, double or triple quotation marks (also called inverted commas).

A

Strings in Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

In Python, List is an ordered collection of any type of data items. Data tems are separated by comma (,) symbol and enclosed in square
brackets ([]).

A

List in Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

an ordered collection of any type of data items.
Data items are separated by comma (,) symbol and enclosed in parentheses or round brackets ().

A

Tuples in Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

List is mutable object, whereas tuple is immutable. An object is
immutable means once it is stored in the memory, it cannot be
changed.

A

The difference between list and tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
collection of key:value pairs. The pairs are separated by comma and put inside curly brackets {}. To establish mapping between key and value, the semicolon':' symbol is put between the two.
Dictionary Type
26
a collection, but is not an indexed or ordered collection as string, list or tuple. An object cannot appear more than once in a set, whereas in List and Tuple, same object can appear more than once.
Set Type
27
refers to converting an object of one type into another.
Casting in Python
28
Types of Operators
* Arithmetic Operators * Comparison (Relational) Operators * Assignment Operators * Logical Operators * Membership Operators * Identity Operators
29
Arithmetic Operators
* Addition Operator (+) * Subtraction Operator (-) * Multiplication Operator (*) * Division Operator (/) * Modulus Operator (%) * Exponent Operator (**) * Floor Division Operator (//)
30
Assignment Operators
* Augmented Addition Operator (+=) * Augmented Subtraction Operator (-=) * Augmented Multiplication Operator (*=) * Augmented Division Operator (/=) * Augmented Modulus Operator (%=) * Augmented Exponent Operator (**=) * Augmented Floor division Operator (//=)
31
Comparison Operators
< Less than a Greater than a>b <= Less than or equal to a<=b >= Greater than or equal to a>=b == Is equal to a==b != Is not equal to a!=b
32
running. This makes the application interactive. Depending on how it is developed, an application may accept the user input in the form of text entered in the console (sys.stdin),
Python - User Input
33
computer programs follow a straightforward sequence, executing one instruction after another in the order they appear.
Control Flow
34
The program is able to decide which of the alternative group of instructions to be executed, depending on value of a certain Boolean expression.
Decision Making
35
Most of the processes require a group of instructions to be repeatedly executed. In programming terminology, it is called a loop. Instead of the next step, if the flow is redirected towards any earlier step, it constitutes a loop.
Looping or Iteration
36
statement takes an expression and compares its value to successive patterns given as one or more case blocks. Only the first pattern that matches gets executed.
MatchCase Statement
37
has the ability to iterate over the items of any sequence, such as a list, tuple or a string.
For loop
38
repeatedly executes a target statement as long as a given Booleanexpression is true.
Python while Loops
39
It terminates the current loop and resumes execution at the next statement, just like the traditional break statement in C.
Python break Statement
40
statement in Python returns the control to the beginning of the current loop. When encountered, the loop starts next iteration without executing the remaining statements in the current iteration.
Python Continue Statement
41
used when a statement is required syntactically but you do not want any command or code to execute.
Python pass Statement
42
block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.
Python Functions
43
examples are print(), int(), len(), sum(), etc. These functions are always available, as they are loaded into computer's memory as soon as you start Python interpreter.
Built-in functions
44
The standard library also bundles a number of modules. Each module defines a group of functions. These functions are not readily available.
Functions defined in built-in modules
45
you can also create your own functions. You can define custom functions to provide the required functionality.
User-defined functions
46
When the function is called, value to each of the formal arguments must be provided. Those are called
actual arguments.
47
While defining a function, you must give a list of variables in which the data passed to it is collected. The variables in the parentheses are called
formal arguments.
48
- You can define a function with default value assigned to one or more formal arguments.
Default Arguments
49
Variables in the function definition are used as keywords. When the function is called, you can explicitly mention the name and its value.
Keyword Arguments
50
A variable defined inside a function has local scope. It means that the variable is only accessible and usable within that specific function.
Local Scope:
51
A variable defined outside of any function, typically at the top level of a Python script or module,
Global Scope:
52
provided to load a Python object from one module. The object may be a function, class, a variable etc.
The import Statement
53
The "+" operator is well-known as an addition operator, returning the sum of two numbers. However, the "+" symbol acts as
String Concatenation
54
With this formatting method you can use embedded Python expressions inside string constants. may contain expressions inside the {} placeholder.
f-string Formatting
55
Escape Sequence
\ -Backslash and newline ignored \r -ASCII Carriage Return (CR) \\ -Backslash (\) \t -ASCII Horizontal Tab (TAB) \‘ -Single quote (') \v -ASCII Vertical Tab (VT) \“ -Double quote (") \ooo -Character with octal value ooo \b -ASCII Backspace (BS) \xhh -Character with hex value hh \f -ASCII Formfeed (FF) \a -ASCII Bell (BEL) \n -ASCII Linefeed (LF)
56
Capitalizes first letter of string
capitalize()
57
Converts all uppercase letters in string to lowercase. Similar to lower(), but works on UNICODE characters alot
casefold()
58
Converts all uppercase letters in string to lowercase.
lower()
59
Inverts case for all letters in string.
swapcase()
60
Returns "titlecased" version of string, that is, all words begin with uppercase and the rest are lowercase.
title()
61
composed of a number pixels arranged in a grid. Each of these pixels is a color that can be represented as a red, green, and blue (RGB) value. These values range from 0 to 255 for each of the red, green, and blue components.
Digital Image
62
raw building blocks of an image.
pixel
63
processing the image digitally with the help of a computer.
Digital Image processing
64
built on the top of PIL (Python Image Library) and is considered as the fork for the same as PIL has been discontinued from 2011.
Pillow
65
module that provides simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and generate graphics on the fly for web use.
ImageDraw Class
66
The Pillow module provides the open() and show() function to read and display the image respectively.
Image Class
67
method of the Image class is used to rotate the image by a particular angle counterclockwise around its center.
rotate()
68
image (flip or rotate in 90 degree steps).
.transpose()
69