Step 1 - Getting Started in Python 3 Flashcards

1
Q

What do you mean by Six Degree of Separation ?

A

Six degrees of separation is the theory that any person on the planet can be connected to any other person on the planet through a chain of acquaintances that has no more than five intermediaries.

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

What is Zen of Python ?

A

The Zen of Python by Tim Peters are 20 guidelines for the design of the Python language. Your Python code doesn’t necessarily have to follow these guidelines, but they’re good to keep in mind. The Zen of Python is an Easter egg, or hidden joke, that appears if you run import this:

> > > import this

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

When was Python Born ?

A

Python was officially born in Feb 20 1991,with version no. 0.9 .

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

What are some Development Environments of Python?

A

Python IDEs are,
Jupyter Notebook,Jupyter Lab
PC or Pycharm
VS Code Editor

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

Which Python Modules are for Data Manipulation ?

A

Numpy & Pandas

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

Which Python Modules are for Scientific Computing ?

A

SciPy Module

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

In which module ML algorithms are efficiently implemented.

A

SciKit Learn or sklearn

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

Which Python Modules are for Big Data ?

A

Hadoopy & PySpark

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

Which Python Modules are to Speed up

or Boosting Python Code as par C Code ?

A

Cython & Numba helps python code run faster.

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

What is a popular test automation framework in Python ?

A

NOSE

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

When was Pythion 3.0 released?

A

In Dec 2008

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

When was Python 2.x End of Life

A

It originally had a scheduled EOL for 2015 but was extended for another five years to 2020

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

What is BSD License ?

A

The abbreviation of BSD is Berkely Source Distribution, It is a low restriction-based license for opensource S/W.Which gives you permission to use it commercially and for redistribution

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

What are Python Identifiers ?

A
Identifiers are the names of objects,
such as varaibles names,class names,function names
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the rules of creating identifiers in Python ?

A
  1. It can be a combination of lower case or uppercase Letters,digits 0-9 & underscore.
  2. It cant be starts with digit.
  3. Special Symbol not allowed except underscore
  4. Keywords not allowed as identifiers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are python Keywords ?

A

These are set of reserved words,which are used to define syntax & structure of the language.
Keywords are case sensitive must be used in lower case

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

What is indentation in python ?

A

Indentation is very important in python,it means you have to maintain proper space from left when writing a code.

18
Q

What are suites in python ?

A

Collection of individual Statements that makes a single code block.Header line begin with a keyword & terminate with a colon: and that are followed by a one or more lines that makes up a suite.

19
Q

What are basic Object types in python?

A

All data in the python program is represented by objects or by relations between objects,objects are data types in python ,
Objects has three things - identity.type & value

20
Q

List some Basic Object types in python ?

A

These are Total Twelve

  1. None
  2. Boolean
  3. Integer
  4. Float
  5. Long
  6. Complex
  7. String
  8. List
  9. Tuple
  10. Set
  11. Dictionary
  12. File
21
Q

How to write comments in Python ?

A

Single Line Comments Starts with #

Multiline comments are within Tripple Quotes “”” “”””

22
Q

How to write multiline statements in python

A

Multiline statements can be written in two ways -
Implicit Continuation - Put the code in brackets and brake the line after binary operator .
x = (1 + 1+ 2 +
3 + 5)
weekdays = [‘Monday’,’Tuesday’,
‘Wednesday’,’Thursday’]
print(weekdays)

Explicit Continuation - Use backslash.
x = 1 + 1+ 2 +\
3 + 5

23
Q

How to write multiple statements in a single line in Python?

A

Use semicolon at the end statement .

24
Q

What is the difference between Expression and Statement in python?

A

Expression: Something which evaluates to a value. Example: 1+2/x
an expression is any section of the code that evaluates to a value

Statement: A line of code which does something. Example: GOTO 100.A statement is a complete line of code that performs some action

25
Q

How many operators are in Python ?

A

They are total 7even-

1.Arithmetic Operators
\+, - , *,  /,  % ,  // ,  **
2. Assighnement Operators
3. Logical Operators
and , or , not
4.Relational or Comparison Operators
==, != , < , > , >= , <=
5.Membership Operators
in , not in
6. Identity Operators
is , is not
7. Bitwise Operators
26
Q

How to use for loop in Python ?

A

list1 = [11,2,3,4,5]

for item in list1:

26
Q

How to use for loop in Python ?

A

list1 = [11,2,3,4,5]
for item in list1:
print(item)

for loop is executed till the item gets value from list 1

27
Q

How to use the while loop ?

A

count =0
while count < 5:
print(Count)
count = count + 1

28
Q

How to use if else ?

A
var = 10
if var == 15:
    print(var)
elif var > 10:
    print(var)
else:
    print(var)
29
Q

What is CRUD ?

A

Abbreviation of CRUD is Create,Read,Update,Delete.

30
Q

How to update a list ?

A

We have Two Methods -
Direct Update - list1[3] = 10

or by using inbuilt functions - 
append,extend,insert
list1.append(value)
list1.extend(1,2,3,4)
list1,insert(index,value)
30
Q

How to Create a list ?

A

We have Two Methods -
Direct Update - list1[3] = 10

or by using inbuilt functions - 
append,extend,insert
list1.append(value)
list1.extend(1,2,3,4)
list1,insert(index,value)
31
Q

How many Arithmatic operators in Python ?

A
Total are 7even Arithmatic operators
Addition  +
Subtraction -
Multiplication *
Division /
Modulus %
Floor Division //
Exponent  **
32
Q

How many Logical Operators ?

A

Total are Three Logical operators
and
or
not

33
Q

What term is called guidelines for the design of python language ?

A

The Term is called Zen of Python

34
Q

What was the first version of Python language ?

A

The first version of python is 0.9 released in Feb 20, 1991

35
Q

What are the three most important things associated with objects/variables in Python ?

A

These are Identity,Type & Value

36
Q

What are docstrings in python ?

A

Multiline Comments enclosed within Tripple quotes are called Docstrings .

37
Q

Who is Tim Peters ?

A

Tim Peters is an American software developer who wrote the set of principles “ The Zen Of Pythons “ and posted it on the Python mailing list in 1999.
The Zen of Python is a collection of 19 “guiding principles” for writing computer programs that influence the design of the Python programming language.

38
Q
A

What is ternary operator in Python,and how to use it