These are the slides of the second part of this multi-part series, from Learn Python Den Haag meetup group. It covers List comprehensions, Dictionary comprehensions and functions.
Introduction to the basics of Python programming (part 3)Pedro Rodrigues
This is the 3rd part of a multi-part series that teaches the basics of Python programming. It covers list and dict comprehensions, functions, modules and packages.
The basics of Python are rather straightforward. In a few minutes you can learn most of the syntax. There are some gotchas along the way that might appear tricky. This talk is meant to bring programmers up to speed with Python. They should be able to read and write Python.
This document summarizes basic operations in Matlab and Python, including programming paradigms, object-oriented fundamentals, arrays/lists, cells/structures, functions, and loops. It provides examples of classes, objects, and inheritance in both languages. Examples are also given for arrays, lists, cells, structures, functions, and loops. The document outlines the key differences between Matlab and Python for arrays, lists, and cells/structures. It concludes with references used in preparing the content.
This document provides an introduction to the Python language and discusses Python data types. It covers how to install Python, interact with the Python interpreter through command line and IDLE modes, and learn basic Python parts like data types, operators, functions, and control structures. The document discusses numeric, string, and other data types in Python and how to manipulate them using built-in functions and operators. It also introduces Python library modules and the arcpy package for geoprocessing in ArcGIS.
Inspired by Josh Bloch's Java Puzzlers, we put together our own Python Puzzlers. This slide deck brings you a set of 10 python puzzlers, that are fun and educational. Each puzzler will show you a piece of python code. Your task if to figure out what happens when the code is run. Whether you're a python beginner or a passionate python veteran, we hope that there's something to learn for everybody.
This slide deck was first presented at shopkick. Nandan Sawant and Ryan Rueth are engineers at shopkick. Keeping the audience in mind, most of the puzzlers are based on python 2.x.
This presentation covers Python most important data structures like Lists, Dictionaries, Sets and Tuples. Exception Handling and Random number generation using simple python module "random" also covered. Added simple python programs at the end of the presentation
Python 101++: Let's Get Down to Business!Paige Bailey
You've started the Codecademy and Coursera courses; you've thumbed through Zed Shaw's "Learn Python the Hard Way"; and now you're itching to see what Python can help you do. This is the workshop for you!
Here's the breakdown: we're going to be taking you on a whirlwind tour of Python's capabilities. By the end of the workshop, you should be able to easily follow any of the widely available Python courses on the internet, and have a grasp on some of the more complex aspects of the language.
Please don't forget to bring your personal laptop!
Audience: This course is aimed at those who already have some basic programming experience, either in Python or in another high level programming language (such as C/C++, Fortran, Java, Ruby, Perl, or Visual Basic). If you're an absolute beginner -- new to Python, and new to programming in general -- make sure to check out the "Python 101" workshop!
Python is a popular programming language that is easy to learn and intuitive. It is well-suited for data science tasks. TensorFlow is a library for machine learning. The document provides an introduction and overview of Python basics like variables, data types, operators, and control structures. It also covers TensorFlow and how it can be used for neural network applications.
This document summarizes an event being organized by the Department of Computer Science Engineering and Department of Electronics and Instrumentation Engineering at Kamaraj College of Engineering and Technology. The event is called "TECHSHOW '19" and is aimed at +2 school students. It will take place on November 30th, 2019 and will include notes on Python programming, including topics like sequence containers, indexing, base types, and functions.
The document discusses different types of functions in programming. It explains that built-in functions are predefined, modular functions are contained in imported modules, and user-defined functions are created using the def keyword. It also discusses function definitions, calling functions, arguments, parameters, and the return statement. Functions can accept inputs, perform tasks, and produce outputs.
This presentation is all about various built in
datastructures which we have in python.
List
Dictionary
Tuple
Set
and various methods present in each data structure
Here are the steps to solve this problem:
1. Convert both lists of numbers to sets:
set1 = {11, 2, 3, 4, 15, 6, 7, 8, 9, 10}
set2 = {15, 2, 3, 4, 15, 6}
2. Find the intersection of the two sets:
intersection = set1.intersection(set2)
3. The number of elements in the intersection is the number of similar elements:
similarity = len(intersection)
4. Print the result:
print(similarity)
The similarity between the two sets is 4, since they both contain the elements {2, 3, 4, 15}.
The presentation from SPb Python Interest Group community meetup.
The presentation tells about the dictionaries in Python, reviews the implementation of dictionary in CPython 2.x, dictionary in CPython 3.x, and also recent changes in CPython 3.6. In addition to CPython the dictionaries in alternative Python implementations such as PyPy, IronPython and Jython are reviewed.
This document provides an introduction to the Python programming language. It discusses what Python is, its history and creator, why it is popular, who uses it, and how to get started with the syntax. Key topics covered include Python's readability, dynamic typing, standard library, and use across many industries. The document also includes code examples demonstrating basic Python concepts like variables, strings, control flow, functions, and file input/output.
This document provides an introduction to Python data structures including lists, tuples, sets, and dictionaries. It describes how to define, access, and modify each type of data structure. It also covers file handling, string functions, exceptions, and other Python concepts. The key points are:
- Lists are the most versatile data type and can contain elements of different types. They can be accessed by index, sliced, modified via assignments to slices.
- Tuples are immutable sequences that are useful for grouping related data. They allow packing and unpacking of elements.
- Sets store unique elements and support mathematical operations like union and intersection.
- Dictionaries store mappings of unique keys to values. They allow
Beginners python cheat sheet - Basic knowledge O T
The document provides an overview of common Python data structures and programming concepts including variables, strings, lists, tuples, dictionaries, conditionals, functions, files, classes, and more. It includes examples of how to define, access, modify, loop through, and perform operations on each type of data structure. Key points covered include using lists to store ordered sets of items, dictionaries to store connections between pieces of information as key-value pairs, and classes to define custom object types with attributes and methods.
The document discusses various Python datatypes. It explains that Python supports built-in and user-defined datatypes. The main built-in datatypes are None, numeric, sequence, set and mapping types. Numeric types include int, float and complex. Common sequence types are str, bytes, list, tuple and range. Sets can be created using set and frozenset datatypes. Mapping types represent a group of key-value pairs like dictionaries.
This document provides an overview of Python fundamentals including basic concepts like data types, operators, flow control, functions and classes. It begins with an introduction to Python versions and environments. The outline covers topics like Hello World, common types and operators for numeric, string and container data types. It also discusses flow control structures like if/else, while loops and for loops. Finally, it briefly mentions functions, classes, exceptions and file I/O.
In this chapter we will review how to work with text files in C#. We will explain what a stream is, what its purpose is, and how to use it. We will explain what a text file is and how can you read and write data to a text file and how to deal with different character encodings. We will demonstrate and explain the good practices for exception handling when working with files. All of this will be demonstrated with many examples in this chapter
Python quickstart for programmers: Python Kung Fuclimatewarrior
The document provides an overview of key Python concepts including data types, operators, control flow statements, functions, objects and classes. It discusses lists in depth, covering creation, iteration, searching and common list methods. It also briefly touches on modules, exceptions, inheritance and other advanced topics.
All data values in Python are encapsulated in relevant object classes. Everything in Python is an object and every object has an identity, a type, and a value. Like another object-oriented language such as Java or C++, there are several data types which are built into Python. Extension modules which are written in C, Java, or other languages can define additional types.
To determine a variable's type in Python you can use the type() function. The value of some objects can be changed. Objects whose value can be changed are called mutable and objects whose value is unchangeable (once they are created) are called immutable.
Introduction to the Python programming language (version 2.x)
Ambient intelligence: technology and design
http://bit.ly/polito-ami
Politecnico di Torino, 2015
This document discusses various Python functions concepts including defining simple functions, functions with arguments, default arguments, lambda functions, generators, and decorators. It provides examples of defining functions that take positional and keyword arguments, using lambda functions, creating generators using yield, and applying decorators to functions. Various introspection methods like type(), dir(), and callable() are also covered.
The document discusses Python generators and how they can be used for iterating over lists, tuples, dictionaries, strings, files and custom iterable objects. It provides examples of using generators and the yield keyword to iterate over a countdown and generate values. The document also discusses two problems - analyzing log files using generators and finding files matching patterns using the os.walk generator.
Python Workshop - Learn Python the Hard WayUtkarsh Sengar
This document provides an introduction to learning Python. It discusses prerequisites for Python, basic Python concepts like variables, data types, operators, conditionals and loops. It also covers functions, files, classes and exceptions handling in Python. The document demonstrates these concepts through examples and exercises learners to practice char frequency counting and Caesar cipher encoding/decoding in Python. It encourages learners to practice more to master the language and provides additional learning resources.
Python is a high-level, interpreted, interactive and object-oriented scripting language that can run on many platforms like Windows, Linux, and Mac. It was created in 1990 by Guido van Rossum and draws influence from languages like C, C++, and Java but has a simpler syntax and emphasizes code readability. Python code is typically more concise than other languages and it has a large standard library, making it useful for tasks like web development, science, and data analysis.
Python 101++: Let's Get Down to Business!Paige Bailey
You've started the Codecademy and Coursera courses; you've thumbed through Zed Shaw's "Learn Python the Hard Way"; and now you're itching to see what Python can help you do. This is the workshop for you!
Here's the breakdown: we're going to be taking you on a whirlwind tour of Python's capabilities. By the end of the workshop, you should be able to easily follow any of the widely available Python courses on the internet, and have a grasp on some of the more complex aspects of the language.
Please don't forget to bring your personal laptop!
Audience: This course is aimed at those who already have some basic programming experience, either in Python or in another high level programming language (such as C/C++, Fortran, Java, Ruby, Perl, or Visual Basic). If you're an absolute beginner -- new to Python, and new to programming in general -- make sure to check out the "Python 101" workshop!
Python is a popular programming language that is easy to learn and intuitive. It is well-suited for data science tasks. TensorFlow is a library for machine learning. The document provides an introduction and overview of Python basics like variables, data types, operators, and control structures. It also covers TensorFlow and how it can be used for neural network applications.
This document summarizes an event being organized by the Department of Computer Science Engineering and Department of Electronics and Instrumentation Engineering at Kamaraj College of Engineering and Technology. The event is called "TECHSHOW '19" and is aimed at +2 school students. It will take place on November 30th, 2019 and will include notes on Python programming, including topics like sequence containers, indexing, base types, and functions.
The document discusses different types of functions in programming. It explains that built-in functions are predefined, modular functions are contained in imported modules, and user-defined functions are created using the def keyword. It also discusses function definitions, calling functions, arguments, parameters, and the return statement. Functions can accept inputs, perform tasks, and produce outputs.
This presentation is all about various built in
datastructures which we have in python.
List
Dictionary
Tuple
Set
and various methods present in each data structure
Here are the steps to solve this problem:
1. Convert both lists of numbers to sets:
set1 = {11, 2, 3, 4, 15, 6, 7, 8, 9, 10}
set2 = {15, 2, 3, 4, 15, 6}
2. Find the intersection of the two sets:
intersection = set1.intersection(set2)
3. The number of elements in the intersection is the number of similar elements:
similarity = len(intersection)
4. Print the result:
print(similarity)
The similarity between the two sets is 4, since they both contain the elements {2, 3, 4, 15}.
The presentation from SPb Python Interest Group community meetup.
The presentation tells about the dictionaries in Python, reviews the implementation of dictionary in CPython 2.x, dictionary in CPython 3.x, and also recent changes in CPython 3.6. In addition to CPython the dictionaries in alternative Python implementations such as PyPy, IronPython and Jython are reviewed.
This document provides an introduction to the Python programming language. It discusses what Python is, its history and creator, why it is popular, who uses it, and how to get started with the syntax. Key topics covered include Python's readability, dynamic typing, standard library, and use across many industries. The document also includes code examples demonstrating basic Python concepts like variables, strings, control flow, functions, and file input/output.
This document provides an introduction to Python data structures including lists, tuples, sets, and dictionaries. It describes how to define, access, and modify each type of data structure. It also covers file handling, string functions, exceptions, and other Python concepts. The key points are:
- Lists are the most versatile data type and can contain elements of different types. They can be accessed by index, sliced, modified via assignments to slices.
- Tuples are immutable sequences that are useful for grouping related data. They allow packing and unpacking of elements.
- Sets store unique elements and support mathematical operations like union and intersection.
- Dictionaries store mappings of unique keys to values. They allow
Beginners python cheat sheet - Basic knowledge O T
The document provides an overview of common Python data structures and programming concepts including variables, strings, lists, tuples, dictionaries, conditionals, functions, files, classes, and more. It includes examples of how to define, access, modify, loop through, and perform operations on each type of data structure. Key points covered include using lists to store ordered sets of items, dictionaries to store connections between pieces of information as key-value pairs, and classes to define custom object types with attributes and methods.
The document discusses various Python datatypes. It explains that Python supports built-in and user-defined datatypes. The main built-in datatypes are None, numeric, sequence, set and mapping types. Numeric types include int, float and complex. Common sequence types are str, bytes, list, tuple and range. Sets can be created using set and frozenset datatypes. Mapping types represent a group of key-value pairs like dictionaries.
This document provides an overview of Python fundamentals including basic concepts like data types, operators, flow control, functions and classes. It begins with an introduction to Python versions and environments. The outline covers topics like Hello World, common types and operators for numeric, string and container data types. It also discusses flow control structures like if/else, while loops and for loops. Finally, it briefly mentions functions, classes, exceptions and file I/O.
In this chapter we will review how to work with text files in C#. We will explain what a stream is, what its purpose is, and how to use it. We will explain what a text file is and how can you read and write data to a text file and how to deal with different character encodings. We will demonstrate and explain the good practices for exception handling when working with files. All of this will be demonstrated with many examples in this chapter
Python quickstart for programmers: Python Kung Fuclimatewarrior
The document provides an overview of key Python concepts including data types, operators, control flow statements, functions, objects and classes. It discusses lists in depth, covering creation, iteration, searching and common list methods. It also briefly touches on modules, exceptions, inheritance and other advanced topics.
All data values in Python are encapsulated in relevant object classes. Everything in Python is an object and every object has an identity, a type, and a value. Like another object-oriented language such as Java or C++, there are several data types which are built into Python. Extension modules which are written in C, Java, or other languages can define additional types.
To determine a variable's type in Python you can use the type() function. The value of some objects can be changed. Objects whose value can be changed are called mutable and objects whose value is unchangeable (once they are created) are called immutable.
Introduction to the Python programming language (version 2.x)
Ambient intelligence: technology and design
http://bit.ly/polito-ami
Politecnico di Torino, 2015
This document discusses various Python functions concepts including defining simple functions, functions with arguments, default arguments, lambda functions, generators, and decorators. It provides examples of defining functions that take positional and keyword arguments, using lambda functions, creating generators using yield, and applying decorators to functions. Various introspection methods like type(), dir(), and callable() are also covered.
The document discusses Python generators and how they can be used for iterating over lists, tuples, dictionaries, strings, files and custom iterable objects. It provides examples of using generators and the yield keyword to iterate over a countdown and generate values. The document also discusses two problems - analyzing log files using generators and finding files matching patterns using the os.walk generator.
Python Workshop - Learn Python the Hard WayUtkarsh Sengar
This document provides an introduction to learning Python. It discusses prerequisites for Python, basic Python concepts like variables, data types, operators, conditionals and loops. It also covers functions, files, classes and exceptions handling in Python. The document demonstrates these concepts through examples and exercises learners to practice char frequency counting and Caesar cipher encoding/decoding in Python. It encourages learners to practice more to master the language and provides additional learning resources.
Python is a high-level, interpreted, interactive and object-oriented scripting language that can run on many platforms like Windows, Linux, and Mac. It was created in 1990 by Guido van Rossum and draws influence from languages like C, C++, and Java but has a simpler syntax and emphasizes code readability. Python code is typically more concise than other languages and it has a large standard library, making it useful for tasks like web development, science, and data analysis.
R is a powerful language for data analysis and visualization. Some key advantages of R include its data-centric approach, large collection of packages, and powerful data visualization capabilities like ggplot2. The document discusses various R concepts like its functional programming style, object-oriented programming using S3 classes, and non-standard evaluation. It also provides examples of how to access R functions and libraries from Python using rpy2.
Python is a versatile, object-oriented programming language that can be used for web development, data analysis, and more. It has a simple syntax and is easy to read and learn. Key features include being interpreted, dynamically typed, supporting functional and object-oriented programming. Common data types include numbers, strings, lists, dictionaries, tuples, and files. Functions and classes can be defined to organize and reuse code. Regular expressions provide powerful string manipulation. Python has a large standard library and is used widely in areas like GUIs, web scripting, AI, and scientific computing.
GE8151 Problem Solving and Python ProgrammingMuthu Vinayagam
The document provides information about various Python concepts like print statement, variables, data types, operators, conditional statements, loops, functions, modules, exceptions, files and packages. It explains print statement syntax, how variables work in Python, built-in data types like numbers, strings, lists, dictionaries and tuples. It also discusses conditional statements like if-else, loops like while and for, functions, modules, exceptions, file handling operations and packages in Python.
This document provides an introduction to Python programming. It demonstrates how to open a Python terminal or IDE, use basic data types like integers, floats, strings, lists, tuples and dictionaries. It shows how to take user input, read and write files, use conditional and loop statements, define functions, and more. Some key points covered include:
- Python uses indentation rather than braces to define code blocks for conditionals and loops.
- All variables are references to objects, and objects have dynamic types.
- Common data types include integers, floats, strings, lists, tuples, dictionaries, booleans, and None.
- Lists and dictionaries are mutable, while tuples are immutable.
- Functions
The document introduces Python programming language. It provides an overview of Python's history and key features such as being an interpreted, object-oriented, and platform independent language. It also discusses Python syntax including data types, variables, input/output, operators, conditional statements, loops, functions, and data structures like lists, tuples, dictionaries. Several examples are given to illustrate different Python concepts and syntax.
The document provides an introduction to Python including:
- Starting the Python interpreter and basic calculations
- Variables, expressions, statements, functions, modules, comments
- Strings, lists, tuples, dictionaries
- Common list, string, and dictionary methods
It covers the basic Python syntax and many common data structures and their associated methods in less than 3 sentences.
The document provides an introduction to Python including:
- Starting the Python interpreter and basic calculations
- Variables, expressions, statements, functions, modules, comments
- Strings, lists, tuples, dictionaries
- Common list, string, and dictionary methods
It covers the basic Python syntax and many common data structures and their associated methods in less than 3 sentences.
The document provides examples and explanations of Python concepts including:
1. Printing "Hello World" with a function.
2. Using lists, including accessing/setting values and adding/removing elements.
3. Using range to generate lists of numbers.
4. Creating and manipulating dictionaries.
5. Logical operators and if/else statements.
6. For loops for iterating over lists and ranges.
7. Defining recursive functions.
This document provides a cheat sheet on Python keywords and basic data types. It lists common Python keywords like False, True, and, or, not, break, continue, class, def, if, else, for, while, in, is, None, lambda, and return along with code examples. It also covers basic data types like Boolean, integer, float, string, list, set, dictionary, and complex data types like classes. It provides examples of using lists, sets, dictionaries, classes and functions in Python.
This document provides examples and descriptions of Python keywords and basic data types. It discusses keywords like False, True, and, or, not, break, continue, class, def, if, elif, else, for, while, in, is, None, lambda, and return. It also covers basic data types like integers, floats, strings, lists, sets, dictionaries, and Boolean values. It provides code examples to demonstrate the usage of these keywords and data types in Python.
This document provides an overview of the Python programming language. It covers topics such as syntax, types and objects, operators and expressions, functions, classes and object-oriented programming, modules and packages, input/output, and the Python execution environment. It also discusses generators and iterators versus regular functions, namespaces and scopes, and classes in Python.
A tour of Python: slides from presentation given in 2012.
[Some slides are not properly rendered in SlideShare: the original is still available at http://www.aleksa.org/2015/04/python-presentation_7.html.]
C# 3.0 introduces many features common in functional programming languages like generics, first-class functions, lambda expressions, and type inference. However, C# retains its object-oriented roots, and some features like datatypes and laziness remain more fully realized in pure functional languages. While C# supports programming in a functional style, its performance characteristics and lack of optimizations mean it may not be a serious competitor to ML and Haskell for functional programming tasks.
How to Manage & Create a New Department in Odoo 18 EmployeeCeline George
In Odoo 18's Employee module, organizing your workforce into departments enhances management and reporting efficiency. Departments are a crucial organizational unit within the Employee module.
This presentation has been made keeping in mind the students of undergraduate and postgraduate level. To keep the facts in a natural form and to display the material in more detail, the help of various books, websites and online medium has been taken. Whatever medium the material or facts have been taken from, an attempt has been made by the presenter to give their reference at the end.
In the seventh century, the rule of Sindh state was in the hands of Rai dynasty. We know the names of five kings of this dynasty- Rai Divji, Rai Singhras, Rai Sahasi, Rai Sihras II and Rai Sahasi II. During the time of Rai Sihras II, Nimruz of Persia attacked Sindh and killed him. After the return of the Persians, Rai Sahasi II became the king. After killing him, one of his Brahmin ministers named Chach took over the throne. He married the widow of Rai Sahasi and became the ruler of entire Sindh by suppressing the rebellions of the governors.
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...EduSkills OECD
Deborah Nusche, Senior Analyst, OECD presents at the OECD webinar 'Trends Spotting: Strategic foresight for tomorrow’s education systems' on 5 June 2025. You can check out the webinar on the website https://oecdedutoday.com/webinars/ Other speakers included: Deborah Nusche, Senior Analyst, OECD
Sophie Howe, Future Governance Adviser at the School of International Futures, first Future Generations Commissioner for Wales (2016-2023)
Davina Marie, Interdisciplinary Lead, Queens College London
Thomas Jørgensen, Director for Policy Coordination and Foresight at European University Association
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecdrazelitouali
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
How to Manage Upselling of Subscriptions in Odoo 18Celine George
Subscriptions in Odoo 18 are designed to auto-renew indefinitely, ensuring continuous service for customers. However, businesses often need flexibility to adjust pricing or quantities based on evolving customer needs.
Unit- 4 Biostatistics & Research Methodology.pdfKRUTIKA CHANNE
Blocking and confounding (when a third variable, or confounder, influences both the exposure and the outcome) system for Two-level factorials (a type of experimental design where each factor (independent variable) is investigated at only two levels, typically denoted as "high" and "low" or "+1" and "-1")
Regression modeling (statistical model that estimates the relationship between one dependent variable and one or more independent variables using a line): Hypothesis testing in Simple and Multiple regression models
Introduction to Practical components of Industrial and Clinical Trials Problems: Statistical Analysis Using Excel, SPSS, MINITAB®️, DESIGN OF EXPERIMENTS, R - Online Statistical Software to Industrial and Clinical trial approach
HOW YOU DOIN'?
Cool, cool, cool...
Because that's what she said after THE QUIZ CLUB OF PSGCAS' TV SHOW quiz.
Grab your popcorn and be seated.
QM: THARUN S A
BCom Accounting and Finance (2023-26)
THE QUIZ CLUB OF PSGCAS.
How to Manage Maintenance Request in Odoo 18Celine George
Efficient maintenance management is crucial for keeping equipment and work centers running smoothly in any business. Odoo 18 provides a Maintenance module that helps track, schedule, and manage maintenance requests efficiently.
Rose Cultivation Practices by Kushal Lamichhane.pdfkushallamichhame
This includes the overall cultivation practices of Rose prepared by:
Kushal Lamichhane (AKL)
Instructor
Shree Gandhi Adarsha Secondary School
Kageshowri Manohara-09, Kathmandu, Nepal
Ray Dalio How Countries go Broke the Big CycleDadang Solihin
A complete and practical understanding of the Big Debt Cycle. A much more practical understanding of how supply and demand really work compared to the conventional economic thinking. A complete and practical understanding of the Overall Big Cycle, which is driven by the Big Debt Cycle and the other major cycles, including the big political cycle within countries that changes political orders and the big geopolitical cycle that changes world orders.
*Order Hemiptera:*
Hemiptera, commonly known as true bugs, is a large and diverse order of insects that includes cicadas, aphids, leafhoppers, and shield bugs. Characterized by their piercing-sucking mouthparts, Hemiptera feed on plant sap, other insects, or small animals. Many species are significant pests, while others are beneficial predators.
*Order Neuroptera:*
Neuroptera, also known as net-winged insects, is an order of insects that includes lacewings, antlions, and owlflies. Characterized by their delicate, net-like wing venation and large, often prominent eyes, Neuroptera are predators that feed on other insects, playing an important role in biological control. Many species have aquatic larvae, adding to their ecological diversity.
How to Create an Event in Odoo 18 - Odoo 18 SlidesCeline George
Creating an event in Odoo 18 is a straightforward process that allows you to manage various aspects of your event efficiently.
Odoo 18 Events Module is a powerful tool for organizing and managing events of all sizes, from conferences and workshops to webinars and meetups.
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...parmarjuli1412
The document provides an overview of therapeutic communication, emphasizing its importance in nursing to address patient needs and establish effective relationships. THERAPEUTIC COMMUNICATION included some topics like introduction of COMMUNICATION, definition, types, process of communication, definition therapeutic communication, goal, techniques of therapeutic communication, non-therapeutic communication, few ways to improved therapeutic communication, characteristics of therapeutic communication, barrier of THERAPEUTIC RELATIONSHIP, introduction of interpersonal relationship, types of IPR, elements/ dynamics of IPR, introduction of therapeutic nurse patient relationship, definition, purpose, elements/characteristics , and phases of therapeutic communication, definition of Johari window, uses, what actually model represent and its areas, THERAPEUTIC IMPASSES and its management in 5th semester Bsc. nursing and 2nd GNM students
Analysis of Quantitative Data Parametric and non-parametric tests.pptxShrutidhara2
This presentation covers the following points--
Parametric Tests
• Testing the Significance of the Difference between Means
• Analysis of Variance (ANOVA) - One way and Two way
• Analysis of Co-variance (One-way)
Non-Parametric Tests:
• Chi-Square test
• Sign test
• Median test
• Sum of Rank test
• Mann-Whitney U-test
Moreover, it includes a comparison of parametric and non-parametric tests, a comparison of one-way ANOVA, two-way ANOVA, and one-way ANCOVA.
RE-LIVE THE EUPHORIA!!!!
The Quiz club of PSGCAS brings to you a fun-filled breezy general quiz set from numismatics to sports to pop culture.
Re-live the Euphoria!!!
QM: Eiraiezhil R K,
BA Economics (2022-25),
The Quiz club of PSGCAS
2. A little about me
{
“Name”: “Pedro Rodrigues”,
“Origin”: {“Country”: “Angola”, “City”: “Luanda”},
“Lives”: [“Netherlands”, 2013],
“Past”: [“CTO”, “Senior Backend Engineer”],
“Present”: [“Freelance Software Engineer”, “Coach”],
“Other”: [“Book author”, “Start a Career with Python”]
}
3. Why this Meetup Group?
Promote the usage of Python
Gather people from different industries and backgrounds
Teach and Learn
4. What will be covered
List and Dictionary comprehensions
Functions
Positional arguments
Keyword arguments
Default parameter values
Variable number of arguments
Names, namespaces and scope
5. A little recap
Python is an interpreted language (CPython is the reference interpreter)
Variables are names bound to objects stored in memory
Data Types: immutable or mutable
Data Types: Numbers (int, float, bool), Sequences (str, tuple, list, bytes, bytearray),
set, dict
Control Flow: if statement, for loop, while loop
Indentation determines whether a statement belongs to a code block or not
Iterables are container objects capable of returning their elements one at a time
Iterators implement the methods __iter__ and __next__
6. List comprehensions
Concise way to create lists
Each element is a the result of a transformation applied to the original element
Regular way of building lists:
new_list = []
for elem in some_sequence:
new_list.append(do_something(elem))
With list comprehension:
new_list = [do_something(elem) for elem in some_sequence]
7. List comprehensions (examples)
names = ["John", "Mary", "Russell", "Devon", "Elizabeth"]
new_names = []
for name in names:
if len(name) > 4:
new_names.append(name)
>>> names = ["John", "Mary", "Russell", "Devon", "Elizabeth"]
>>> new_names = [name for name in names if len(name) > 4]
>>> new_names
['Russell', 'Devon', 'Elizabeth']
8. List comprehensions (examples)
pairs = []
for i in range(3):
for j in range(3):
if i != j:
pairs.append((i, j))
>>> pairs = [(i, j) for i in range(3) for j in range(3) if i != j]
>>> pairs
[(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]
9. List comprehensions (challenge)
Use split and sorted to print a sorted list of strings read from the standard input. Use a
list comprehension for build a list where the strings are in lowercase.
Strings in the standard input are separated by commas (no spaces)
Sample input: THIs,is,A,strING,WITH,COMmas
Sample output: ['a', 'commas', 'is', 'string', 'this', 'with']
>>> "Hello,World,how,are,you".split(",")
['Hello', 'World', 'how', 'are', 'you']
>>> sorted(["b", "z", "a", "c", "l"])
['a', 'b', 'c', 'l', 'z']
10. Dictionary comprehensions
Concise way to create dictionaries
Keys and/or Values are the result of applying transformations to elements in the original sequence
Regular way of building a dictionary:
d = {}
for k, v in some_seq:
key = do_something(k)
value = do_something(v)
d[key] = value
With dict comprehension:
d = {do_something(k): do_something(v) for k, v in some_seq}
11. Dictionary comprehensions (examples)
d = {}
for i in range(2, 11, 2):
d[i] = i**2
d = {i: i**2 for i in range(2, 11, 2)}
>>> d
{8: 64, 2: 4, 4: 16, 10: 100, 6: 36}
12. Dictionary comprehensions (examples)
# example: name=Pedro age=34
info = input("> ")
info_list = [item.split("=") for item in info.split(" ")]
info_dict = {}
for k, v in info_list:
key = k.capitalize()
d[key] = v
>>> info_dict
{'Age': '34', 'Name': 'Pedro'}
13. Dictionary comprehensions (examples)
# With dict comprehension
>>> info = input("> ")
>>> d = {k.capitalize(): v for k, v in [item.split("=") for item in info.split(" ")]}
>>> d
{'Age': '34', 'Name': 'Pedro'}
14. Dictionary comprehensions (challenge)
Build a dictionary where the keys are in lowercase and the values are integers,
from a string read from the standard input
Sample input: John=28 Martha=32 Stewart=46 Peter=30
Sample output:
{'stewart': 46, 'peter': 30, 'john': 28, 'martha': 32}
15. Functions
Callable data type
Control Flow construct
def function_name(params_list):
suite
def print_hello_world():
print("Hello")
print("World")
18. Challenge
Read coordinates from standard input and print the distance between the two points.
Use list comprehension and sequence unpacking.
Define a function that takes 4 integers (x1, y1, x2, y2) and returns the distance between
two points: Point 1 (x1, y1), Point 2 (x2, y2).
(𝑥2 − 𝑥1)2+(𝑦2 − 𝑦1)2
>>> import math
>>> math.sqrt(16)
4.0
Sample input: 1 3 7 4
Sample output: 6.082762530298219
20. Keyword arguments
The order of the arguments doesn’t matter
def sum_squares(x, y):
return x**2 + y**2
>>> sum_squares(y=3, x=2)
13
You cannot have a positional argument after a keyword argument
>>> sum_squares(y=3, 2)
22. Default parameter values
For parameters with default value, the corresponding argument can be omitted
def sum_squares(x, y=3):
return x**2 + y**2
>>> sum_squares(2)
13
After the first parameter with default value, all other parameters must have default
value
# Wrong!
def sum_squares(x=2, y):
return x**2 + y**2
23. Default parameter values
Be careful with mutable default values!
names = ["John", "Louise"]
def print_hello(n=names):
for name in n:
print("Hello, ", name)
names.append("Something")
>>> print_hello()
Hello, John
Hello, Louise
>>> names
['John', 'Louise', 'Something']
24. Variable number of arguments
def function_name(*args, **kwargs):
pass
args is initialized as a tuple with positional arguments
kwargs is initialized as a dictionary with keyword arguments
The words args and kwargs are just a convention, they are not reserved in
Python.
29. Challenge
Sample input: x1=1 y1=3 x2=7 y2=4, x1=13 y1=10 x2=109 y2=45
Sample output:
6.082762530298219
102.18121158021175
Use dict comprehension and unpack the dictionary in distance.
30. Names, Namespaces and Scope
Namespace: place where the binding between names and objects are stored.
Different namespaces: built-in, global module namespace, local namespace for
a function, objects namespace.
Scope is a text region that determines whether a namespace is available or not.
Scope influences name resolution.
31. Names, Namespaces and Scope
Global module namespace
x = 10
print(x)
Local namespace of a function
x = 10
def print_x():
x = 5
print(x) # prints 5
32. Names, Namespaces and Scope
Local namespace of a function
x = 10
def print_x():
print(x) # prints 10
33. Names, Namespaces and Scope
People coming from other languages, beware of for loops!
>>> for i in range(3):
... print(i)
...
0
1
2
>>> print(i)
2
34. Names, Namespaces and Scope
Namespaces have different life times:
Local namespace is created when a function is called and destroyed when the function
returns.
Global module namespace is created when the module definition is read in.
Built-in namespace is created when the interpreter starts and is never destroyed during
the program execution.
Global namespace of a function is the global namespace of the module where the
function was defined.
35. Reading material
List comprehensions: https://docs.python.org/3.5/tutorial/datastructures.html#list-
comprehensions
Dict comprehensions:
https://docs.python.org/3.5/tutorial/datastructures.html#dictionaries
Functions and parameters:
https://docs.python.org/3.5/reference/compound_stmts.html#function-definitions
Names, Namespaces and Scopes:
https://docs.python.org/3.5/tutorial/classes.html#a-word-about-names-and-
objects
36. More resources
Python Tutorial: https://docs.python.org/3/tutorial/index.html
Python Language Reference: https://docs.python.org/3/reference/index.html
Slack channel: https://startcareerpython.slack.com/
Start a Career with Python newsletter: https://www.startacareerwithpython.com/
Book: Start a Career with Python
Book 15% off (NZ6SZFBL): https://www.createspace.com/6506874
Editor's Notes
#3: I speak a bit fast, but don’t worry because the presentation will be available online, as well as a Slack channel.
#12: Note that the keys are not ordered, which is normal. If you depend on the order of the keys, use OrderedDict instead.