This document provides an introduction to object-oriented programming in Python. It discusses key concepts like classes, instances, inheritance, and modules. Classes group state and behavior together, and instances are created from classes. Methods defined inside a class have a self parameter. The __init__ method is called when an instance is created. Inheritance allows classes to extend existing classes. Modules package reusable code and data, and the import statement establishes dependencies between modules. The __name__ variable is used to determine if a file is being run directly or imported.
Functions allow programmers to organize and reuse code. They take in parameters and return values. Parameters act as variables that represent the information passed into a function. Arguments are the actual values passed into the function call. Functions can have default parameter values. Functions can return values using the return statement. Python passes arguments by reference, so changes made to parameters inside functions will persist outside the function as well. Functions can also take in arbitrary or keyword arguments. Recursion is when a function calls itself within its own definition. It breaks problems down into sub-problems until a base case is reached. The main types of recursion are direct, indirect, and tail recursion. Recursion can make code more elegant but uses more memory than iteration.
This chapter discusses creating Windows applications in C# using Visual Studio, including differentiating between Windows and console applications, using forms and controls like buttons and labels, and handling events. It provides an overview of graphical user interfaces and windows applications, and demonstrates how to create a simple Windows application with forms and controls through code examples. The document also covers best practices for application design and the use of Visual Studio for developing Windows applications.
This document contains information about a mentoring program run by Baabtra-Mentoring Partner. It includes:
- A disclaimer that this is not an official Baabtra document
- A table showing a mentee's typing speed progress over 5 weeks
- An empty table to track jobs applied to by the mentee
- An explanation of sets in Python, including how to construct, manipulate, perform operations on, and iterate over sets
- Contact information for Baabtra
This document provides an overview of Lex and Yacc, which are tools used for generating scanners and parsers. Lex is used for lexical analysis by generating a scanner from regular expressions and actions. Yacc is used for syntactic analysis by generating a parser from a context-free grammar and semantic actions. Together, the scanner generated by Lex and parser generated by Yacc can be used to build a compiler. The document discusses various aspects of Lex and Yacc like grammar rules, precedence, shift-reduce conflicts and provides examples of Lex and Yacc files.
- Python uses reference counting and a cyclic garbage collector to manage memory and free objects that are no longer referenced. It allocates memory for objects in blocks and assigns them to size classes based on their size.
- Objects in Python have a type and attributes. They are created via type constructors and can have specific attributes like __dict__, __slots__, and descriptors.
- At the Python virtual machine level, code is represented as code objects that contain details like the bytecode, constants, and variable names. Code objects are compiled from Python source files.
Python Advanced – Building on the foundationKevlin Henney
This is a two-day course in Python programming aimed at professional programmers. The course material provided here is intended to be used by teachers of the language, but individual learners might find some of this useful as well.
The course assume the students already know Python, to the level taught in the Python Foundation course: http://www.slideshare.net/Kevlin/python-foundation-a-programmers-introduction-to-python-concepts-style)
The course is released under Creative Commons Attribution 4.0. Its primary location (along with the original PowerPoint) is at https://github.com/JonJagger/two-day-courses/tree/master/pa
Introduction to IPython & Jupyter NotebooksEueung Mulyana
The document discusses IPython and the Jupyter Notebook. IPython is an interactive shell for Python that provides features like command history, tab completion, object introspection, and support for parallel computing. It has three main components: an enhanced interactive Python shell, a two-process communication model that allows clients to connect to a computation kernel, and architecture for interactive parallel computing. The Jupyter Notebook provides a browser-based notebook interface that allows code, text, plots and other media to be combined. IPython QtConsole provides a graphical interface for IPython with features like inline figures and multiline editing.
This document summarizes constructors in Java. Constructors are methods that have the same name as the class and are executed during object creation. Constructors do not have a return type. Constructors are categorized as having no parameters, parameters, or being a default constructor added by the compiler. Constructors without parameters are called with the new keyword, while parameterized constructors pass arguments to the constructor. Default constructors are added by the compiler if no other constructor is defined.
This Edureka Python tutorial will help you in learning various sequences in Python - Lists, Tuples, Strings, Sets, Dictionaries. It will also explain various operations possible on them. Below are the topics covered in this tutorial:
1. Python Sequences
2. Python Lists
3. Python Tuples
4. Python Sets
5. Python Dictionaries
6. Python Strings
This document provides an overview of Pandas, a Python library used for data analysis and manipulation. Pandas allows users to manage, clean, analyze and model data. It organizes data in a form suitable for plotting or displaying tables. Key data structures in Pandas include Series for 1D data and DataFrame for 2D (tabular) data. DataFrames can be created from various inputs and Pandas includes input/output tools to read data from files into DataFrames.
This document discusses string formatting in Python. It explains that Python uses placeholders like %s and %d to format strings with values. The % operator method of string formatting is deprecated in Python 3 and the str.format() method is recommended instead. The format() method allows accessing formatting arguments by position or name to customize the order and labels of values in formatted strings.
Wrapper classes allow primitive data types to be used as objects. Wrapper classes include Integer, Double, Boolean etc. Strings in Java are immutable - their values cannot be changed once created. StringBuffer and StringBuilder can be used to create mutable strings that can be modified. StringTokenizer can split a string into tokens based on a specified delimiter.
This document provides an introduction to the Python programming language. It covers Python's background, syntax, types, operators, control flow, functions, classes, tools, and IDEs. Key points include that Python is a multi-purpose, object-oriented language that is interpreted, strongly and dynamically typed. It focuses on readability and has a huge library of modules. Popular Python IDEs include Emacs, Vim, Komodo, PyCharm, and Eclipse.
The document is about Python's datetime module. It introduces the module and the key classes it contains for manipulating dates and times, including Date, Time, and DateTime objects. It shows how to create datetime objects from these classes, extract attributes like year and hour, and perform operations like adding or subtracting days to manipulate dates. Examples are provided demonstrating common datetime tasks in Python like printing dates in different formats, finding today's date, and comparing datetime objects.
The document discusses dependency injection with Spring. It defines dependency injection as a design pattern that allows removing hardcoded dependencies and changing them at runtime. It presents different types of dependency injection like setter and constructor injection. It demonstrates how to configure dependency injection with Spring using XML configuration files or annotations and inject dependencies into objects. Benefits of dependency injection include easier testing, improved reusability, and cleaner code.
- Java threads allow for multithreaded and parallel execution where different parts of a program can run simultaneously.
- There are two main ways to create a Java thread: extending the Thread class or implementing the Runnable interface.
- To start a thread, its start() method must be called rather than run(). Calling run() results in serial execution rather than parallel execution of threads.
- Synchronized methods use intrinsic locks on objects to allow only one thread to execute synchronized code at a time, preventing race conditions when accessing shared resources.
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
The document discusses various C++ constructors including default constructors, initialization lists, copy constructors, assignment operators, and destructors. It provides examples of how to properly implement these special member functions to avoid problems like shallow copying and double deletes.
This document summarizes data types in C#, including value types (such as int, float, enumerations, and structs), reference types (such as objects, strings, classes, arrays, and delegates), and how everything inherits from System.Object. It explains that value types directly contain variable data while reference types contain a reference to the data. The document also outlines the hierarchies for value types and reference types.
What is Multithreading In Python | Python Multithreading Tutorial | EdurekaEdureka!
This document discusses multithreading in Python. It defines multitasking as the ability of an operating system to perform different tasks simultaneously. There are two types of multitasking: process-based and thread-based. A thread is a flow of execution within a process. Multithreading in Python can be achieved by importing the threading module. Multithreading is useful when multiple independent tasks need to be performed. The document outlines three ways to create threads in Python: without creating a class, by extending the Thread class, and without extending the Thread class. The advantages of multithreading include enhanced performance, simplified coding, and better CPU utilization.
This document discusses synchronization in multi-threaded programs. It covers monitors, which are used as mutually exclusive locks to synchronize access to shared resources. The synchronized keyword in Java can be used in two ways - by prefixing it to a method header, or by synchronizing an object within a synchronized statement. Examples are provided to demonstrate synchronization issues without locking, and how to resolve them by using the synchronized keyword in methods or on objects.
This the slide stack for the two videos on Data types in my YouTube series on JavaScript. The videos are at https://www.youtube.com/watch?v=UAtJXkGggOU and https://www.youtube.com/watch?v=H2sjsGZyYaw
Python is an open source programming language created in 1991 by Guido van Rossum to be easy to read. It is used by many large companies like NASA, Facebook, Google, and IBM in their core products and services. Python can be used for desktop apps, mobile apps, web apps, AI, machine learning, IoT, and more. It supports object oriented programming, is interpreted and extensible with libraries, and can be run on Windows and Linux. Popular Python web frameworks include Django and Flask.
Python Advanced – Building on the foundationKevlin Henney
This is a two-day course in Python programming aimed at professional programmers. The course material provided here is intended to be used by teachers of the language, but individual learners might find some of this useful as well.
The course assume the students already know Python, to the level taught in the Python Foundation course: http://www.slideshare.net/Kevlin/python-foundation-a-programmers-introduction-to-python-concepts-style)
The course is released under Creative Commons Attribution 4.0. Its primary location (along with the original PowerPoint) is at https://github.com/JonJagger/two-day-courses/tree/master/pa
Introduction to IPython & Jupyter NotebooksEueung Mulyana
The document discusses IPython and the Jupyter Notebook. IPython is an interactive shell for Python that provides features like command history, tab completion, object introspection, and support for parallel computing. It has three main components: an enhanced interactive Python shell, a two-process communication model that allows clients to connect to a computation kernel, and architecture for interactive parallel computing. The Jupyter Notebook provides a browser-based notebook interface that allows code, text, plots and other media to be combined. IPython QtConsole provides a graphical interface for IPython with features like inline figures and multiline editing.
This document summarizes constructors in Java. Constructors are methods that have the same name as the class and are executed during object creation. Constructors do not have a return type. Constructors are categorized as having no parameters, parameters, or being a default constructor added by the compiler. Constructors without parameters are called with the new keyword, while parameterized constructors pass arguments to the constructor. Default constructors are added by the compiler if no other constructor is defined.
This Edureka Python tutorial will help you in learning various sequences in Python - Lists, Tuples, Strings, Sets, Dictionaries. It will also explain various operations possible on them. Below are the topics covered in this tutorial:
1. Python Sequences
2. Python Lists
3. Python Tuples
4. Python Sets
5. Python Dictionaries
6. Python Strings
This document provides an overview of Pandas, a Python library used for data analysis and manipulation. Pandas allows users to manage, clean, analyze and model data. It organizes data in a form suitable for plotting or displaying tables. Key data structures in Pandas include Series for 1D data and DataFrame for 2D (tabular) data. DataFrames can be created from various inputs and Pandas includes input/output tools to read data from files into DataFrames.
This document discusses string formatting in Python. It explains that Python uses placeholders like %s and %d to format strings with values. The % operator method of string formatting is deprecated in Python 3 and the str.format() method is recommended instead. The format() method allows accessing formatting arguments by position or name to customize the order and labels of values in formatted strings.
Wrapper classes allow primitive data types to be used as objects. Wrapper classes include Integer, Double, Boolean etc. Strings in Java are immutable - their values cannot be changed once created. StringBuffer and StringBuilder can be used to create mutable strings that can be modified. StringTokenizer can split a string into tokens based on a specified delimiter.
This document provides an introduction to the Python programming language. It covers Python's background, syntax, types, operators, control flow, functions, classes, tools, and IDEs. Key points include that Python is a multi-purpose, object-oriented language that is interpreted, strongly and dynamically typed. It focuses on readability and has a huge library of modules. Popular Python IDEs include Emacs, Vim, Komodo, PyCharm, and Eclipse.
The document is about Python's datetime module. It introduces the module and the key classes it contains for manipulating dates and times, including Date, Time, and DateTime objects. It shows how to create datetime objects from these classes, extract attributes like year and hour, and perform operations like adding or subtracting days to manipulate dates. Examples are provided demonstrating common datetime tasks in Python like printing dates in different formats, finding today's date, and comparing datetime objects.
The document discusses dependency injection with Spring. It defines dependency injection as a design pattern that allows removing hardcoded dependencies and changing them at runtime. It presents different types of dependency injection like setter and constructor injection. It demonstrates how to configure dependency injection with Spring using XML configuration files or annotations and inject dependencies into objects. Benefits of dependency injection include easier testing, improved reusability, and cleaner code.
- Java threads allow for multithreaded and parallel execution where different parts of a program can run simultaneously.
- There are two main ways to create a Java thread: extending the Thread class or implementing the Runnable interface.
- To start a thread, its start() method must be called rather than run(). Calling run() results in serial execution rather than parallel execution of threads.
- Synchronized methods use intrinsic locks on objects to allow only one thread to execute synchronized code at a time, preventing race conditions when accessing shared resources.
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
The document discusses various C++ constructors including default constructors, initialization lists, copy constructors, assignment operators, and destructors. It provides examples of how to properly implement these special member functions to avoid problems like shallow copying and double deletes.
This document summarizes data types in C#, including value types (such as int, float, enumerations, and structs), reference types (such as objects, strings, classes, arrays, and delegates), and how everything inherits from System.Object. It explains that value types directly contain variable data while reference types contain a reference to the data. The document also outlines the hierarchies for value types and reference types.
What is Multithreading In Python | Python Multithreading Tutorial | EdurekaEdureka!
This document discusses multithreading in Python. It defines multitasking as the ability of an operating system to perform different tasks simultaneously. There are two types of multitasking: process-based and thread-based. A thread is a flow of execution within a process. Multithreading in Python can be achieved by importing the threading module. Multithreading is useful when multiple independent tasks need to be performed. The document outlines three ways to create threads in Python: without creating a class, by extending the Thread class, and without extending the Thread class. The advantages of multithreading include enhanced performance, simplified coding, and better CPU utilization.
This document discusses synchronization in multi-threaded programs. It covers monitors, which are used as mutually exclusive locks to synchronize access to shared resources. The synchronized keyword in Java can be used in two ways - by prefixing it to a method header, or by synchronizing an object within a synchronized statement. Examples are provided to demonstrate synchronization issues without locking, and how to resolve them by using the synchronized keyword in methods or on objects.
This the slide stack for the two videos on Data types in my YouTube series on JavaScript. The videos are at https://www.youtube.com/watch?v=UAtJXkGggOU and https://www.youtube.com/watch?v=H2sjsGZyYaw
Python is an open source programming language created in 1991 by Guido van Rossum to be easy to read. It is used by many large companies like NASA, Facebook, Google, and IBM in their core products and services. Python can be used for desktop apps, mobile apps, web apps, AI, machine learning, IoT, and more. It supports object oriented programming, is interpreted and extensible with libraries, and can be run on Windows and Linux. Popular Python web frameworks include Django and Flask.
Python was named after the British comedy group Monty Python by its creator Guido van Rossum. It is a high-level, general-purpose programming language that is easy to learn and use. Python code can run on many platforms like Windows, Linux, and Mac. It has a large standard library and rich set of tools and modules for rapid application development. Python supports multiple programming paradigms like object-oriented, functional, and procedural programming. It is widely used in areas like machine learning, web development, GUI programming, software development, and IoT. Some major companies that use Python extensively include Netflix, Google, Facebook, Amazon, and YouTube.
The document provides an overview of the Python programming language. It discusses what Python is, its history and naming, features like being dynamically typed and interpreted, popular applications like web development, machine learning, and its architecture. It also covers Python constructs like variables, data types, operators, and strings. The document compares Python to other languages and provides examples of common Python concepts.
The Ring programming language version 1.5.3 book - Part 6 of 184Mahmoud Samir Fayed
- Ring is a simple, dynamically typed scripting language designed for productivity. It aims to have clear program structure and encourage organization.
- Key features include object-oriented support, reflection, exception handling, math/string/file functions, and embedding capabilities. It can be used to create applications, games, and declarative domain-specific languages.
- The language focuses on transparency - its implementation and each compiler stage can be clearly seen. It also aims to have natural, minimal syntax and encourage nesting and organization of code.
Python is an interpreted, object-oriented programming language that uses indentation to identify blocks of code. It is dynamically typed and strongly typed, with objects determining types at runtime rather than requiring explicit type declaration. Common data types include mutable types like lists and dictionaries as well as immutable types like strings and tuples.
The Ring programming language version 1.5.4 book - Part 6 of 185Mahmoud Samir Fayed
This document provides an overview of the Ring programming language. Key features include native object-oriented support with encapsulation, inheritance, polymorphism and composition. It also supports reflection, exception handling, runtime code evaluation, I/O, math functions, strings, lists, files, databases, security, internet, zip, and CGI functionality. The language aims to have clear structure, be compact, encourage organization, and support both procedural and object-oriented paradigms. It can be used to create applications, libraries, games and more.
The document discusses Python interview questions and answers related to Python fundamentals like data types, variables, functions, objects and classes. Some key points include:
- Python is an interpreted, interactive and object-oriented programming language. It uses indentation to identify code blocks rather than brackets.
- Python supports dynamic typing where the type is determined at runtime. It is strongly typed meaning operations inappropriate for a type will fail with an exception.
- Common data types include lists (mutable), tuples (immutable), dictionaries, strings and numbers.
- Functions use def, parameters are passed by reference, and variables can be local or global scope.
- Classes use inheritance, polymorphism and encapsulation to create
The document provides an overview of the Python programming language. It discusses why Python is useful for students and professionals, its major features like being object-oriented and having a large standard library. The document also covers Python's history, how to install it and set the environment variables, basic syntax like variables and data types, operators, and common programming constructs like conditionals and loops.
The document discusses Python programming language. It provides an overview of what Python is, what it can be used for, and why it is a popular language. Specifically, it notes that Python was created by Guido van Rossum and released in 1991. It is used for web development, software development, mathematics, and system scripting. The document then covers Python syntax, basic data types, operators, decision making and control flow statements like if/else and loops.
C++ STL (quickest way to learn, even for absolute beginners).pptxGauravPandey43518
C++ STL is a collection of containers and algorithms that provide common programming tasks. It includes data structures like vector, set, map as well as sorting and searching algorithms. Using STL containers makes code shorter, faster and more error-free compared to manually writing these routines. STL is important for learning advanced C++ concepts like graphs and algorithms.
This document provides an overview of the basics of the Python programming language. It discusses Python's history and features, data types like numbers, strings, lists, tuples and dictionaries. It also covers Python concepts like variables, operators, control flow statements and functions. Specific topics covered include Python interpreters, comments, variables and scopes, data structures, conditional statements like if/else, and exceptions handling.
This document provides a cheat sheet for Python basics. It begins with an introduction to Python and its advantages. It then covers key Python data types like strings, integers, floats, lists, tuples, and dictionaries. It explains how to define variables, functions, conditional statements, and loops. The document also demonstrates built-in functions, methods for manipulating common data structures, and other Python programming concepts in a concise and easy to understand manner.
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfAbi john
Analyze the growth of meme coins from mere online jokes to potential assets in the digital economy. Explore the community, culture, and utility as they elevate themselves to a new era in cryptocurrency.
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, presentation slides, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nächste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden “automatisch” im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, während sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewährleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung häufiger Probleme in HCL Nomad Web untersuchen, einschließlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- Verständnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
Web & Graphics Designing Training at Erginous Technologies in Rajpura offers practical, hands-on learning for students, graduates, and professionals aiming for a creative career. The 6-week and 6-month industrial training programs blend creativity with technical skills to prepare you for real-world opportunities in design.
The course covers Graphic Designing tools like Photoshop, Illustrator, and CorelDRAW, along with logo, banner, and branding design. In Web Designing, you’ll learn HTML5, CSS3, JavaScript basics, responsive design, Bootstrap, Figma, and Adobe XD.
Erginous emphasizes 100% practical training, live projects, portfolio building, expert guidance, certification, and placement support. Graduates can explore roles like Web Designer, Graphic Designer, UI/UX Designer, or Freelancer.
For more info, visit erginous.co.in , message us on Instagram at erginoustechnologies, or call directly at +91-89684-38190 . Start your journey toward a creative and successful design career today!
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
Unlocking the Power of IVR: A Comprehensive Guidevikasascentbpo
Streamline customer service and reduce costs with an IVR solution. Learn how interactive voice response systems automate call handling, improve efficiency, and enhance customer experience.
Generative Artificial Intelligence (GenAI) in BusinessDr. Tathagat Varma
My talk for the Indian School of Business (ISB) Emerging Leaders Program Cohort 9. In this talk, I discussed key issues around adoption of GenAI in business - benefits, opportunities and limitations. I also discussed how my research on Theory of Cognitive Chasms helps address some of these issues
2. About Me
Porimol Chandro
CSE 32 D
World University of Bangladesh(WUB)
Software Engineer,
Sohoz Technology Ltd.(STL)
FB : fb.com/porimol.chandro
Github : github.com/porimol
Email : [email protected]
3. Overview
● Background
● Syntax
● Data Types
● Operators
● Control Flow
● Functions
● OOP
● Modules/Packages
● Applications of Python
● Learning Resources
6. What is Python?
● Interpreted
● High Level Programming Language
● Multi-purpose
● Object Oriented
● Dynamic Typed
● Focus on Readability and Productivity
7. Features
● Easy to Learn
● Easy to Read
● Cross Platform
● Everything is an Object
● Interactive Shell
● A Broad Standard Library
8. Who Uses Python?
● Google
● Facebook
● Microsoft
● NASA
● PBS
● ...the list goes on...
9. Releases
● Created in 1989 by Guido Van Rossum
● Python 1.0 released in 1994
● Python 2.0 released in 2000
● Python released in 2008
● Python 3.x is the recommended version
15. Comments
# This is traditional one line comments
“This one is also one comment”
“““
If any string not assigned to a variable, then it is said to be multi-line
comments
This is the example of multi-line comments
”””
20. Strings
Single line
str_var = “World University of Bangladesh(WUB)”
Single line
str_var = ‘Computer Science & Engineering’
Multi-line
str_var = “““World University of Bangladesh (WUB) established under the private University Act, 1992 (amended in 1998),
approved and recognized by the Ministry of Education, Government of the People's Republic of Bangladesh and the University
Grants Commission (UGC) of Bangladesh is a leading university for utilitarian education.ucation.”””
Multi-line
str_var = ‘‘‘The University is governed by a board of trustees constituted as per private universities Act 2010 which is a non-
profit making concern.’’’
21. List
List in python known as a list of comma-separated
values or items between square brackets. A list
might be contain different types of items.
25. Dictionary
Another useful data type built into Python is the
dictionary. Dictionaries are sometimes found in
other programming languages as associative
memories or associative arrays.
26. Dictionary
Blank dictionary
dpt = {}
dpt = dict()
Set by key & get by key
dpt = {1: "CSE", 2: "CE", 3: "EEE"}
dpt[4] = “TE”
print(dpt[1])
Key value rules
A dictionary might be store any types of element but the key must be immutable.
For example:
marks = {"rakib" : 850, "porimol" : 200}
29. Arithmetic operators
Operator Meaning Example
+ Add two operands x+y
- Subtract right operand from the
left
x-y
* Multiply two operands x*y
/ Divide left operand by the right
one
X/y
% Modulus - remainder of the
division of left operand by the
right
X%y
// Floor division - division that
results into whole number
adjusted to the left in the number
line
X//y
** Exponent - left operand raised to
the power of right
x**y
30. Comparison operators
Operator Meaning Example
> Greater that - True if left operand
is greater than the right
x > y
< Less that - True if left operand is
less than the right
x < y
== Equal to - True if both operands
are equal
x == y
!= Not equal to - True if operands
are not equal
x != y
>= Greater than or equal to - True if
left operand is greater than or
equal to the right
x >= y
<= Less than or equal to - True if left
operand is less than or equal to
the right
x <= y
31. Logical operators
Operator Meaning Example
and True if both the operands are truex and y
or True if either of the operands is
true
x or y
not True if operand is false
(complements the operand)
not x
32. Bitwise operators
Operator Meaning Example
& Bitwise AND x& y = 0 (0000 0000)
| Bitwise OR x | y = 14 (0000 1110)
~ Bitwise NOT ~x = -11 (1111 0101)
^ Bitwise XOR x ^ y = 14 (0000 1110)
>> Bitwise right shift x>> 2 = 2 (0000 0010)
<< Bitwise left shift x<< 2 = 40 (0010 1000)
35. Conditions
if Statement
if 10 > 5:
print(“Yes, 10 is greater than 5”)
else Statement
if 10 > 5:
print(“Yes, 10 is greater than 5”)
else:
print(“Dhur, eita ki shunailen?”)
36. Loops
For Loop
for i in range(8) :
print(i)
Output
0
1
2
3
4
5
6
7
While Loop
i = 1
while i < 5 :
print(i)
i += 1
Output
1
2
3
4
5
39. Syntax of Function
Syntax:
def function_name(parameters):
“““docstring”””
statement(s)
Example:
def greet(name):
"""This function greets to the person passed in as parameter"""
print("Hello, " + name + ". Good morning!")
Function Call
greet(“Mr. Roy”)
42. Classes
Class is a blueprint for the object. A class creates a new local namespace
where all its attributes are defined. Attributes may be data or functions.
A simple class defining structure:
class MyNewClass:
'''This is a docstring. I have created a new class'''
pass
43. Class Example
class Vehicle:
# This is our first vehicle class
def color(self)
print(“Hello, I am color method from Vehicle class.”)
print(Vehicle.color)
Hello, I am color method from Vehicle class.
44. Objects
Object is simply a collection of data (variables) and methods (functions) that
act on those data.
Example of an Object:
obj = Vehicle()
47. Modules
● A module is a file containing Python definitions and statements. The file
name is the module name with the suffix .py appended.
● A module allows you to logically organize your Python code. Grouping
related code into a module makes the code easier to understand and use.
48. Packages
● Packages are a way of structuring Python’s module namespace by using
“dotted module names”.
● A package is a collection of Python modules: while a module is a single
Python file, a package is a directory of Python modules containing an
additional __init__.py file, to distinguish a package from a directory that just
happens to contain a bunch of Python scripts.
51. Applications
● Scientific and Numeric
● Web Application
● Mobile Application
● Cross Platform GUI
● Natural Language Processing
● Machine Learning
● Deep Learning
● Internet of Things
● ...the application goes on...