ser jared Flashcards

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
Q

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.

A

Dictionary Type

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

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.

A

Set Type

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

refers to converting an object of one
type into another.

A

Casting in Python

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

Types of Operators

A
  • Arithmetic Operators
  • Comparison (Relational) Operators
  • Assignment Operators
  • Logical Operators
  • Membership Operators
  • Identity Operators
29
Q

Arithmetic Operators

A
  • Addition Operator (+)
  • Subtraction Operator (-)
  • Multiplication Operator (*)
  • Division Operator (/)
  • Modulus Operator (%)
  • Exponent Operator (**)
  • Floor Division Operator (//)
30
Q

Assignment Operators

A
  • Augmented Addition Operator (+=)
  • Augmented Subtraction Operator (-=)
  • Augmented Multiplication Operator (*=)
  • Augmented Division Operator (/=)
  • Augmented Modulus Operator (%=)
  • Augmented Exponent Operator (**=)
  • Augmented Floor division Operator (//=)
31
Q

Comparison Operators

A

< Less than a<b

> 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
Q

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),

A

Python - User Input

33
Q

computer programs follow a straightforward sequence,
executing one instruction after another in the order they appear.

A

Control Flow

34
Q

The program is able to decide which of the alternative group of
instructions to be executed, depending on value of a certain Boolean
expression.

A

Decision Making

35
Q

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.

A

Looping or Iteration

36
Q

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.

A

MatchCase Statement

37
Q

has the ability to iterate over the items of any
sequence, such as a list, tuple or a string.

A

For loop

38
Q

repeatedly executes a target statement as long as a given Booleanexpression is
true.

A

Python while Loops

39
Q

It terminates the current loop and resumes execution at the next
statement, just like the traditional break statement in C.

A

Python break Statement

40
Q

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.

A

Python Continue Statement

41
Q

used when a statement is required
syntactically but you do not want any command or code to execute.

A

Python pass Statement

42
Q

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.

A

Python Functions

43
Q

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.

A

Built-in functions

44
Q

The standard library also
bundles a number of modules. Each module defines a group of
functions. These functions are not readily available.

A

Functions defined in built-in modules

45
Q

you can also create your own functions. You
can define custom functions to provide the required functionality.

A

User-defined functions

46
Q

When the function is called, value to
each of the formal arguments must be
provided. Those are called

A

actual
arguments.

47
Q

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

A

formal
arguments.

48
Q
  • You can define a function with default value
    assigned to one or more formal arguments.
A

Default Arguments

49
Q

Variables in the function definition are used as keywords.
When the function is called, you can explicitly mention the name and
its value.

A

Keyword Arguments

50
Q

A variable defined inside a function has local scope. It
means that the variable is only accessible and usable within that
specific function.

A

Local Scope:

51
Q

A variable defined outside of any function, typically at
the top level of a Python script or module,

A

Global Scope:

52
Q

provided to load a Python
object from one module. The object may be a function, class, a
variable etc.

A

The import Statement

53
Q

The “+” operator is well-known as an addition operator, returning the
sum of two numbers. However, the “+” symbol acts as

A

String Concatenation

54
Q

With this formatting method you can use embedded Python expressions inside string constants. may contain expressions inside the {} placeholder.

A

f-string Formatting

55
Q

Escape Sequence

A

<newline> -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
Q

Capitalizes first letter of string

A

capitalize()

57
Q

Converts all uppercase letters in string to lowercase. Similar
to lower(), but works on UNICODE characters alot

A

casefold()

58
Q

Converts all uppercase letters in string to lowercase.

A

lower()

59
Q

Inverts case for all letters in string.

A

swapcase()

60
Q

Returns “titlecased” version of string, that is, all words begin
with uppercase and the rest are lowercase.

A

title()

61
Q

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.

A

Digital Image

62
Q

raw building blocks of an image.

A

pixel

63
Q

processing the image digitally with the help of a computer.

A

Digital Image processing

64
Q

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.

A

Pillow

65
Q

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.

A

ImageDraw Class

66
Q

The Pillow module provides the open() and show() function to read
and display the image respectively.

A

Image Class

67
Q

method of the Image class is used to rotate the image by a
particular angle counterclockwise around its center.

A

rotate()

68
Q

image (flip or rotate in 90 degree steps).

A

.transpose()

69
Q
A