Step 1 - Getting Started in Python 3 Flashcards
What do you mean by Six Degree of Separation ?
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.
What is Zen of Python ?
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
When was Python Born ?
Python was officially born in Feb 20 1991,with version no. 0.9 .
What are some Development Environments of Python?
Python IDEs are,
Jupyter Notebook,Jupyter Lab
PC or Pycharm
VS Code Editor
Which Python Modules are for Data Manipulation ?
Numpy & Pandas
Which Python Modules are for Scientific Computing ?
SciPy Module
In which module ML algorithms are efficiently implemented.
SciKit Learn or sklearn
Which Python Modules are for Big Data ?
Hadoopy & PySpark
Which Python Modules are to Speed up
or Boosting Python Code as par C Code ?
Cython & Numba helps python code run faster.
What is a popular test automation framework in Python ?
NOSE
When was Pythion 3.0 released?
In Dec 2008
When was Python 2.x End of Life
It originally had a scheduled EOL for 2015 but was extended for another five years to 2020
What is BSD License ?
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
What are Python Identifiers ?
Identifiers are the names of objects, such as varaibles names,class names,function names
What are the rules of creating identifiers in Python ?
- It can be a combination of lower case or uppercase Letters,digits 0-9 & underscore.
- It cant be starts with digit.
- Special Symbol not allowed except underscore
- Keywords not allowed as identifiers.
What are python Keywords ?
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
What is indentation in python ?
Indentation is very important in python,it means you have to maintain proper space from left when writing a code.
What are suites in python ?
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.
What are basic Object types in python?
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
List some Basic Object types in python ?
These are Total Twelve
- None
- Boolean
- Integer
- Float
- Long
- Complex
- String
- List
- Tuple
- Set
- Dictionary
- File
How to write comments in Python ?
Single Line Comments Starts with #
Multiline comments are within Tripple Quotes “”” “”””
How to write multiline statements in python
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
How to write multiple statements in a single line in Python?
Use semicolon at the end statement .
What is the difference between Expression and Statement in python?
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
How many operators are in Python ?
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
How to use for loop in Python ?
list1 = [11,2,3,4,5]
for item in list1:
How to use for loop in Python ?
list1 = [11,2,3,4,5]
for item in list1:
print(item)
for loop is executed till the item gets value from list 1
How to use the while loop ?
count =0
while count < 5:
print(Count)
count = count + 1
How to use if else ?
var = 10 if var == 15: print(var) elif var > 10: print(var) else: print(var)
What is CRUD ?
Abbreviation of CRUD is Create,Read,Update,Delete.
How to update a list ?
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)
How to Create a list ?
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)
How many Arithmatic operators in Python ?
Total are 7even Arithmatic operators Addition + Subtraction - Multiplication * Division / Modulus % Floor Division // Exponent **
How many Logical Operators ?
Total are Three Logical operators
and
or
not
What term is called guidelines for the design of python language ?
The Term is called Zen of Python
What was the first version of Python language ?
The first version of python is 0.9 released in Feb 20, 1991
What are the three most important things associated with objects/variables in Python ?
These are Identity,Type & Value
What are docstrings in python ?
Multiline Comments enclosed within Tripple quotes are called Docstrings .
Who is Tim Peters ?
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.
What is ternary operator in Python,and how to use it