Python functions allow breaking down code into reusable blocks to perform tasks. There are several types of functions including built-in, user-defined, and anonymous functions. User-defined functions are defined using the def keyword and can take in parameters. Functions can return values using the return statement. Functions are called by their name along with any arguments. Arguments are passed into parameters and can be positional, keyword, or have default values. Functions increase code reuse and readability.
This presentation provides the information on python including the topics Python features, applications, variables and operators in python, control statements, numbers, strings, print formatting, list and list comprehension, dictionaries, tuples, files, sets, boolean, mehtods and functions, lambda expressions and a sample project using Python.
This presentation provides the information on python including the topics Python features, applications, variables and operators in python, control statements, numbers, strings, print formatting, list and list comprehension, dictionaries, tuples, files, sets, boolean, mehtods and functions, lambda expressions and a sample project using Python.
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
4. Free and Open Source
High-level, multi-purpose programming
language
Developed by Guido Van Rossum in the
late 1980s
Python is an interpreter-based
language
5. Portable, and Extensible
Python can be integrated with other popular programming
technologies like C, C++, Java, ActiveX, and CORBA.
Dynamic Typing
Supports procedural, object-oriented, & functional programming
12. 12
What can you do with Python
Develop web applications
Implementing machine learning algorithms such as Scikit-learn, NLTK
and Tensor flow .
Computer vision – Face detection , color detection while using OpenCV and python
Raspberry Pi – You can even build a robot and automate your home.
PyGame – Gaming applications
13.
14.
15. Is a reserved memory location to store
values
Variable Name
Every value in Python has
data type.
12
Computer memory
Age
0
Address
(index)
Data
Variables are used to store data, they take
memory space based on the type of value we
assigning to them.
Age = 12
16. 16
Names cannot start with a number ,
No spaces in the names, use underscore _ instead
Special characters are not allowed as variable names
income@, <>, ?, ! , (), #,$ ,% , ^, &,*,~,- +
Variable Names and Naming rules
Variables in Python are case sensitive
It can only start with a character or an underscore
17.
18. 20
Name Type Description
Integers int Whole numbers, such as 8 12 400
Floating Point float Numbers with a decimal point 3.3, 14.5, 500.0
Strings Str Ordered sequence of characters
“hello” , “Sammy”, “2000”, “*$LL”
Lists List Ordered sequence of objects [10, “hello world”, 112.4]
Dictionaries dict Unordered key:value pairs {“key”:”value”}
Tuples tup Ordered immutable sequence of objects (30,”Bye”, 111.32)
Sets Set Unordered collection of unique objects (10,20)
Booleans Bool Logical value indicating True or False
Data Types
22. String formatting
24
There are multiple ways to format strings for printing variables
in them
Myvar= “Hello”
Print(myvar + “World”)
This is knowns as string interpolation
28. 30
Booleans are two constant objects
It has only two possible values
Booleans are considered as numeric type in Python
Booleans
1. True
2. False
True == 1
False == 0
None as a Boolean value
Bool(None)
bool(3), bool(-3), bool(0) Nonzero integers are
truth
bool() method to convert a value to Boolean()
29. 31
Boolean operators are those that take Boolean inputs and
return Boolean results
and operator can be defined in terms of ‘not’ and ‘or’
Boolean operators
Boolean operators are and , not, or
or operator can be defined in terms of ‘not’ and ‘and’
31. Provides us with 3 types of control
statements
Conditional Programming
Used to control the order of execution of the program based on
the values and logic
continue
break
pass
32. 34
expression: It’s the condition that needs to evaluated and
return a boolean (true/false)value.
statement: statement is a general python code that executes if
the expression returns true.
Control Structures
34. 36
Loops
Loop statements are used to execute the block of the code repeatedly for
a specified number of times
There are three types of loops
Python for loop
Python while loop
Python nested loop
35. 38
while Loop
Syntax :
while test_expression:
#statement(s)
While loop will execute a block of statement as long as test expression is true
36. 39
while ..else Loop
While loop will execute a block of statement as long as test expression is true
while test:
statements
if test: break # Exit loop now, skip else if present
if test: continue # Go to top of loop now, to test1
else:
statements # Run if we didn't hit a 'break'
37. 40
continue statement
forces the loop to continue or execute the next iteration
When the continue statement is executed in the loop, the code inside the loop following
the continue statement will be skipped and the next iteration of the loop will begin.
39. 42
Nested for and while loops
Syntax : nested for loop
for <iterator_var1> in <iterable_object1>:
for <iterator_var2> in <iterable_object2>:
#statement(s)
#statement(s)
Loop statement inside another loop statement
Syntax : nested while loop
while <exp1>:
while<exp2>
#statement(s)
#statement(s)
41. 44
Nested for and while loops
Syntax : nested for loop
for <iterator_var1> in <iterable_object1>:
for <iterator_var2> in <iterable_object2>:
#statement(s)
#statement(s)
Loop statement inside another loop statement
Syntax : nested while loop
while <exp1>:
while<exp2>
#statement(s)
#statement(s)
43. 46
Sets
Identified by curly braces
-{‘Raja’,’Ashok’,’Alok’}
Sets do not support indexing
A set an unordered collection data type that
holds an unordered collection of unique elements
set is iterable , mutable and has no duplicate
44. 47
Description Commands
Add item to set x x.add(item)
Remove an item x.remove(item)
get length of x len(x)
Check membership in x item in x
item not in x
Pop random item from set x x.pop()
Delete all items from x x.clear()
Basic Operations on Set
45. 48
Basic Operations on Set
A set is a python data type that holds an unordered collection of unique elements
Identified by curly braces
-{‘Raja’,’Ashok’,’Alok’}
Can only contain unique elements
Duplicates are eliminated
Sets do not support indexing
47. 50
Ranges
range is another kind of immutable sequence type
ranges are also called as generators
Note that the range includes the
lower bound and excludes the
upper bound.
If we pass a single parameter to the range function, it is used as the upper bound
If we use two parameters, the first is the lower bound and the second is the upper bound.
If we use three, the third parameter is the step size.
The default lower bound is zero, and the default step size is one
50. What is a function ?
Why use functions ?
Types of functions ?
Functions Vs Methods
Function Signatures - Parameter Vs Arguments
User-Defined functions
The return statement
How to call a function
How to add docstrings to a function
Function arguments in python
Global Vs Local Variables
Recursive & Anonymous functions
Using main() as a function
Function as an argument
Function as return value
Map and filter() function
inner function & Decorator
Positional Vs Keyword arguments
51. It’s a block of code using which you want to carry out a specific task repeatedly
A function may contain zero or more than one arguments
What are functions ?
53. Built-in functions, such as help() to ask for help, min() to get the minimum value,
print() to print an object to the terminal
User-Defined Functions (UDFs), which are functions that users create to help them
out;
Types of functions
Anonymous functions, which are also called lambda functions because they are not
declared with the standard def keyword
54. How to define user-defined functions ?
Syntax
def functionName(<parameter list>):
statement 1
statement 2
…
return expression
is used to return a value from a function
def net_sal(basic, hra, loan):
keyword
return Nsal
Here, basic, hra, and loan are called parameters of net_sal()
Also note that, basic, hra, and loan are variables ,
local to my function net_sal()
55. 59
How to call a function ?
def net_sal(basic, hra, loan):
Gsal = basic + hra
Calling a function is Python is similar to other programming languages
Also note that, basic, hra, and loan are variables ,
local to my function net_sal()
Nsal = Gsal - loan
return Nsal
net_sal(100000,22000,5000)
Syntax
function_name(arg1, arg2,arg3)
Here, basic, hra, and loan are the arguments of net_sal function
basic, hra, and loan are passed by reference
The memory addresses of basic, hra, and loan are passed
When we call the function
56. 60
Positional arguments
def net_sal(basic, hra, loan):
# code here
Most common way of assigning arguments to parameters:
via the order in which they are passed
When we call the function
net_sal(basic,hra, loan)
basic = 132000
hra = 22000
loan = 5000
basic = 128000
hra = 21000
loan = 6000
Its positional arguments
57. 61
Keyword arguments
def net_sal(basic, hra, loan):
# code here
When we call the function
net_sal(basic=132000,hra = 22000, loan = 5000)
basic = 132000
hra = 22000
loan = 5000
basic = 128000
hra = 21000
loan = 6000
Its keyword arguments
Once you have defined the keyword argument , you must specify the
Keyword for all the other arguments
net_sal(132000, hra=22000, 5000)
Keyword = value
Like positional args, the no. of args and parameters must still match
58. 62
Keyword arguments
When we call the function
net_sal(132000,hra = 22000, loan = 5000)
net_sal(132000, 22000, loan = 5000) Its keyword arguments
Can I call a function using both positional and keyword arguments ??
net_sal(132000, hra=22000,
5000)
59. 63
Default argument values
def net_sal(basic, hra=22000, loan=5000):
# code here
When we call the function
net_sal(132000)
net_sal(basic=132000,hra = 22000)
net_sal(hra=22000, basic=132000)
When you use keyword
Argument the order doesn’t matter
60. 64
Arguments in summary
Positional arguments must agree in order and number with the parameters
declared in the function definition
Keyword arguments must agree with declared parameters in number, but they may be
specified in arbitrary order
Default parameters allow some arguments to be omitted when function is called