
Quick Contact
Python Tutorial
- What is Python?
- How to Install Python?
- Python Variables and Operators
- Python Loops
- Python Functions
- Python Files
- Python Errors and Exceptions
- Python Packages
- Python Classes and Objects
- Python Strings
- PostgreSQL Data Types
- Python Generators and Decorators
- Python Dictionary
- Python Date and Time
- Python List and Tuples
- Python Multithreading and Synchronization
- Python Modules
- What is Python bytecode?
- Python Regular Expressions
Python Panda Tutorial
- Python Pandas Tutorial
- Python Pandas Features
- Advantages and Disadvantages of Python Pandas
- Pandas Library In Python
- Pandas Series To Frame
- Python Dataframeaggregate and Assign
- Pandas Dataframe Describe
- Pandas Dataframe Mean
- Pandas Hist
- Pandas Dataframe Sum
- How to convert Pandas DataFrame to Numpy array
Python Selenium
- Selenium Basics
- Selenium with Python Introduction and Installation
- Navigating links using get method Selenium Python
- Locating Single Elements in Selenium Python
- Locating Multiple elements in Selenium Python
Python Flask Tutorial
Python Django
- How to Install Django and Set Up a Virtual Environment in 6 Steps
- Django MTV Architecture
- Django Models
- Django Views
- Django Templates
- Django Template Language
- Django Project Layout
- Django Admin Interface
- Django Database
- Django URLs and URLConf
- Django Redirects
- Django Cookies and Cookies Handling
- Django Caching
- Types of Caching in Django
- Django Sessions
- Django Forms Handling & Validation
- Django Exceptions & Error-handling
- Django Forms Validation
- Django Redirects
- Django Admin Interface
- Django Bootstrap
- Ajax in Django
- Django Migrations and Database Connectivity
- Django Web Hosting and IDE
- Django Admin Customization
- What is CRUD?
- Django ORM
- Django Request-Response Cycle
- Django ORM
- Making a basic_api with DRF
- Django Logging
- Django Applications
- Difference between Flask vs Django
- Difference between Django vs PHP
Numpy
- Numpy Introduction
- NumPy– Environment Setup
- NumPy - Data Types
- NumPy–Functions
- NumPy Histogram
- numPy.where
- numpy.sort
- NumPyfloor
- Matrix in NumPy
- NumPy Arrays
- NumPy Array Functions
- Matrix Multiplication in NumPy
- NumPy Matrix Transpose
- NumPy Array Append
- NumPy empty array
- NumPy Linear Algebra
- numpy.diff()
- numpy.unique()
- numpy.dot()
- numpy.mean()
- Numpy.argsort()
- numpy.pad()
- NumPyvstack
- NumPy sum
- NumPy Normal Distribution
- NumPylogspace()
- NumPy correlation
- Why we learn and use Numpy?
Tensorflow
- Introduction To Tensorflow
- INTRODUCTION TO DEEP LEARNING
- EXPLAIN NEURAL NETWORK?
- CONVOLUTIONAL AND RECURRENT NEURAL NETWORK
- INTRODUCTION TO TENSORFLOW
- INSTALLATION OF TENSORFLOW
- TENSORBOARD VISUALIZATION
- Linear regression in tensorflow
- Word Embedding
- Difference between CNN And RNN
- Explain Keras
- Program elements in tensorflow
- Recurrent Neural Network
- Tensorflow Object Detection
- EXPLAIN MULTILAYER PERCEPTRON
- GRADIENT DESCENT OPTIMIZATION
Interview Questions & Answers
Python Functions
The function is a structure of a program which supports the re-usability. These functions enable suitable modularity for the software in an individual action. Python supports built-in functions like Print (). It enables the clients to generate the function of our own. These are called user-defined functions.
Rules for representing a function
The function name must begin with a def keyword pursue by a function name and parenthesis.
All the arguments and input parameters must be located inside the parenthesis.
The functional program within the function must begin with the colon :
It can exit the function, and we can utilize the return (this can assign object return to the caller)
Syntax
def. func_name():
statements ()
return
Example
def sum(x,y):
z=x+y
return z
sum (10, 20)
Output
30
Function calling (or) function invoking
The definition of the function would provide the name and define the values/ parameter that should be contained in a function. Once the function has provided the basic mechanism, it can be implemented by calling from the other functions. Besides, this can also be known as from the python prompt.
Syntax
Def function_name ():
Print ()
Function_name ()
Example
Def first ():
print (‘this is the first function’)
first ()
Arguments
These are the values passed in a function. There are the following types of arguments are as follows:
Default arguments
These arguments support a default value if nothing is kept in the function call. These have to be represented in the function definition.
Keyword arguments
These arguments are associated with the calls. Due to parameter, name-caller recognize the arguments. This enables skipping arguments.
Required arguments
These are those arguments that are passed to the function in the right series as per their situations.
Variable-length arguments
In some methods, we require to write functions that accept more arguments than they specified. These arguments are known as these arguments as a variable-length argument.
Scope of the variable
The variables declare this have multiple scopes.
Local variable
The variables that can be approached in a function, where it is declared. It cannot be approached outside the function.
Example
def first():
a = ‘We are the local variable’
print (a)
first ()
Output
We are the local variable
Global Variable
This is unlike the local variable. This can be accessed worldwide. The variables that are declared ones can be approached a few functions.
Example
Def. f():
s= ‘We’ are the local function. We override the global function
print (s)
a= ‘We are the local function, we cannot access the outside the function f
print (a)
# Global scope
b= “Since, We are the global function, print S is called before the function, and first expected”
f ()
a= ‘i love python’
Print (a)
Output
Since, We are the global function, print S is called before the function, and first expected we are the local function. We overrided the global function
We are the local function, and we cannot access the outside the function f
I love python
What are Doc strings?
It supports an appropriate method of relating records, with python modules, classes, functions, and methods. doc_ strings can be approached by __doc__ attribute.
How to define a docstring?
The docstring line must begin with a capital letter. The first line must be a short definition, and we must not write the object name.
Example
def my_function ():
“””Illustrate docstrings and does nothing really.”””
return None
print (“Using __doc__:”)
print (my_function.__doc__)
Output
Using __doc__:
Demonstrate docstrings and does nothing really.
Parameter Passing
There are two most general methods of passing a parameter to a function.
Call by Value
This method is used in C, C++ or Java but not utilized in Python. In call by value, the values of actual arguments are replica to function’s formal arguments, and both types of arguments are saved in individual memory locations.
Call by Reference
The functions are known by reference in Python, which defines all the modification implemented to the inside the function reflected in an actual argument.
Recursive Functions
The recursive function is a function that calls itself in its definition. For instance the mathematical function, factorial, represented by factorial(n) = n*(n-1)*(n-2)*…*3*2*1. can be defined as:
def factorial(n):
#n here should be an integer
if n == 0:
return 1
else:
return n*factorial(n-1)
Apply now for Advanced Python Training Course