SlideShare a Scribd company logo
Fundamentals of Python Programming
What is Python?
● Python is a popular high-level programming language used in various
applications
○ Python is an easy language to learn because of its simple syntax
○ Python can be used for simple tasks such as plotting or for more complex tasks like
machine learning
Variables, Objects, and Classes
● A variable is a reference to a value stored in a computer’s memory.
● Variables can be sorted into a variety of categories (or data types) such
as numbers (int/float etc), Boolean values (true/false), and
sequences (strings, lists etc).
● An object is a collection of data from a computer’s memory that can be
manipulated.
○ ALL VARIABLES ARE OBJECTS although some objects can be defined by data
referred to by multiple variables.
○ Methods are the functions used to act on/alter an object’s data. They
describe what your object can “do.”
Variables, Objects, and Classes (cont.)
● A class is a collection of objects
who share the same set of
variables/methods.
○ The definition of the class provides a
blueprint for all the objects within it
(instances).
○ Instances may share the same
variables (color, size, shape, etc.), but
they do NOT share the same values
for each variable (blue/red/pink,
small/large, square/circular etc.)
Basic Syntax Rules
● The name of your variable (myInt etc.) is placed on the left of the “=“ operator.
○ Most variable names are in camel case where the first word begins with a lowercase letter and any subsequent words
are capitalized
○ Variable names may also appear in snake case where all words are lowercase, with underscores between words
● The assignment operator (“=“) sets the variable name equal to the memory location where your value is found.
● The value of your variable (“Hello, World”) is placed on the right of the “=“ operator.
○ The type of this value does NOT need to be stated but its format must abide by a given object type (as shown).
Basic Syntax Rules
● Function Syntax
○ def...: indicates that you are defining a new function.
○ function() refers to the name of your function. By convention, this name is typically lowercase and represents a verb/action.
○ a,b refers to parameters (values or variables) that can be used within the statements of your function’s definition (......). If
your function has no parameters, an empty parenthetical () is used.
○ The return statement is an optional statement that will return a value for your function to your original call.
Basic Syntax Rules (cont.)
● Calling a function
○ Call the function by referring to its name (function()) and by placing
any necessary arguments (1, 2) within the parenthesis separated by
commas. myValue = function(1, 2)
○ If you wish, you can set your function call equal to a variable (myValue). The value
returned by the function will be assigned to your variable name.
Common Data Types and Operators
● A data type is a means of classifying a value and determining what operations can
be performed on it. All objects have a data type.
● Operators are symbols used carry out specific functions/computations.
● https://www.youtube.com/watch?v=v5MR5JnKcZI
Input/Output
● Input functions (input()) allow users of a program to place values into
programming code.
○ The parameter for an input function is called a prompt. This is a
string (this can be indicated by “” or ‘’) such as “Enter a number: “
○ The user’s response to the prompt will be returned to the input
statement call as a string. To use this value as any other data
type, it must be converted with another function (int()).
● Print functions (print()) allow programs to output strings to users on a
given interface.
○ The parameter of this function is of any type. All types will
automatically be converted to strings.
If-else Statements
● If-else statements allow programmers to adapt the function of their
code based on a given condition.
● If a given condition (i.e. x % 2 == 0) is true, then the statements
following the if statement (if) will be executed. If the condition is false,
the statements following the else statement (else) will be executed.
○ The condition is tested using the Boolean operators == (is equal
to), != (is not equal to), and (used to test multiple conditions),
and or (used to test if AT LEAST ONE condition is true).
○ Additionally, else-if statements (elif) can be used to provide
unique coding statements for multiple conditions.
For Loops
● For loops perform the same task (iterate) for the number of
times specified by an iterable (something that can be evaluated
repeatedly such as a list, string, or range).
● for defines the for loop
● x is the variable defining the number of times the statements
within the loop (print(myInt)) are executed.
● The range(start, stop, step) function is often used to define x.
○ The starting value is defined by start, the final value is
defined by stop – 1, and the magnitude at which x
changes between loops is defined by step.
● in is a Boolean operator that returns true if the given value (x) is
found within a given list, string, range etc.
While Loops
● While loops are statements that iterate so long as a given
Boolean condition is met.
○ x (the variable determining whether or not the
condition is met) is defined and manipulated
OUTSIDE of the header of the while loop (while)
○ The condition (x < 5) is a statement containing a
Boolean variable.
○ break is a statement used to exit the current
for/while loop.
○ continue is a statement used to reject all
statements in the current for/while loop iteration
and return to the beginning of the loop.
Conclusion
• Python is versatile and beginner-friendly
• Key fundamentals: syntax, data types, control flow, and
functions
• Next steps: Explore advanced topics and libraries

More Related Content

PPTX
Introduction of python Introduction of python Introduction of python
PPTX
what-is-python-presentation.pptx
PPTX
What is Paython.pptx
PPTX
python-presentation.pptx
PPTX
Problem Solving and Python Programming PPT.This will be helpfull for first ye...
PPTX
uom-2552-what-is-python-presentation (1).pptx
PPTX
uom-2552-what-is-python-presentationalllllll.pptx
PPTX
Intro to python programming (basics) in easy language
Introduction of python Introduction of python Introduction of python
what-is-python-presentation.pptx
What is Paython.pptx
python-presentation.pptx
Problem Solving and Python Programming PPT.This will be helpfull for first ye...
uom-2552-what-is-python-presentation (1).pptx
uom-2552-what-is-python-presentationalllllll.pptx
Intro to python programming (basics) in easy language

Similar to Presentation of Python Programming Language (20)

PPTX
uom-2552-what-is-python-presentation.pptx
PPTX
What is python-presentation FOR CLASS 10.pptx
PPTX
PYTHON Introduction 1Deep learning 2.pptx
PPTX
python-presentationpython-presentationpython-presentation.pptx
PPTX
Introduction to Python Programming language
PPTX
Python Programming - Variables, Objects and Classes
PPTX
python-presentation basic for coding.pptx
PPTX
PYTHON PPT.pptx python is very useful for day to day life
PPTX
Integrating Python with SQL (12345).pptx
PPTX
introduction to Python | Part 1
PDF
Python Module-1.1.pdf
DOCX
A Introduction Book of python For Beginners.docx
PPTX
Introduction to Python Part-1
PPTX
Basic concept of Python.pptx includes design tool, identifier, variables.
PPTX
Presgfdjfwwwwwwwwwwqwqeeqentation11.pptx
PDF
computer science CLASS 11 AND 12 SYLLABUS.pdf
PDF
Introduction To Programming with Python
PDF
Python: An introduction A summer workshop
PPTX
Introduction To Python.pptx
PPTX
An Introduction : Python
uom-2552-what-is-python-presentation.pptx
What is python-presentation FOR CLASS 10.pptx
PYTHON Introduction 1Deep learning 2.pptx
python-presentationpython-presentationpython-presentation.pptx
Introduction to Python Programming language
Python Programming - Variables, Objects and Classes
python-presentation basic for coding.pptx
PYTHON PPT.pptx python is very useful for day to day life
Integrating Python with SQL (12345).pptx
introduction to Python | Part 1
Python Module-1.1.pdf
A Introduction Book of python For Beginners.docx
Introduction to Python Part-1
Basic concept of Python.pptx includes design tool, identifier, variables.
Presgfdjfwwwwwwwwwwqwqeeqentation11.pptx
computer science CLASS 11 AND 12 SYLLABUS.pdf
Introduction To Programming with Python
Python: An introduction A summer workshop
Introduction To Python.pptx
An Introduction : Python
Ad

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Newfamily of error-correcting codes based on genetic algorithms
PDF
DevOps & Developer Experience Summer BBQ
PPTX
Big Data Technologies - Introduction.pptx
PDF
Chapter 2 Digital Image Fundamentals.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Reimagining Insurance: Connected Data for Confident Decisions.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
Cloud computing and distributed systems.
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
Newfamily of error-correcting codes based on genetic algorithms
DevOps & Developer Experience Summer BBQ
Big Data Technologies - Introduction.pptx
Chapter 2 Digital Image Fundamentals.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
NewMind AI Monthly Chronicles - July 2025
CroxyProxy Instagram Access id login.pptx
Advanced Soft Computing BINUS July 2025.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Reimagining Insurance: Connected Data for Confident Decisions.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
Cloud computing and distributed systems.
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
Ad

Presentation of Python Programming Language

  • 2. What is Python? ● Python is a popular high-level programming language used in various applications ○ Python is an easy language to learn because of its simple syntax ○ Python can be used for simple tasks such as plotting or for more complex tasks like machine learning
  • 3. Variables, Objects, and Classes ● A variable is a reference to a value stored in a computer’s memory. ● Variables can be sorted into a variety of categories (or data types) such as numbers (int/float etc), Boolean values (true/false), and sequences (strings, lists etc). ● An object is a collection of data from a computer’s memory that can be manipulated. ○ ALL VARIABLES ARE OBJECTS although some objects can be defined by data referred to by multiple variables. ○ Methods are the functions used to act on/alter an object’s data. They describe what your object can “do.”
  • 4. Variables, Objects, and Classes (cont.) ● A class is a collection of objects who share the same set of variables/methods. ○ The definition of the class provides a blueprint for all the objects within it (instances). ○ Instances may share the same variables (color, size, shape, etc.), but they do NOT share the same values for each variable (blue/red/pink, small/large, square/circular etc.)
  • 5. Basic Syntax Rules ● The name of your variable (myInt etc.) is placed on the left of the “=“ operator. ○ Most variable names are in camel case where the first word begins with a lowercase letter and any subsequent words are capitalized ○ Variable names may also appear in snake case where all words are lowercase, with underscores between words ● The assignment operator (“=“) sets the variable name equal to the memory location where your value is found. ● The value of your variable (“Hello, World”) is placed on the right of the “=“ operator. ○ The type of this value does NOT need to be stated but its format must abide by a given object type (as shown).
  • 6. Basic Syntax Rules ● Function Syntax ○ def...: indicates that you are defining a new function. ○ function() refers to the name of your function. By convention, this name is typically lowercase and represents a verb/action. ○ a,b refers to parameters (values or variables) that can be used within the statements of your function’s definition (......). If your function has no parameters, an empty parenthetical () is used. ○ The return statement is an optional statement that will return a value for your function to your original call.
  • 7. Basic Syntax Rules (cont.) ● Calling a function ○ Call the function by referring to its name (function()) and by placing any necessary arguments (1, 2) within the parenthesis separated by commas. myValue = function(1, 2) ○ If you wish, you can set your function call equal to a variable (myValue). The value returned by the function will be assigned to your variable name.
  • 8. Common Data Types and Operators ● A data type is a means of classifying a value and determining what operations can be performed on it. All objects have a data type. ● Operators are symbols used carry out specific functions/computations. ● https://www.youtube.com/watch?v=v5MR5JnKcZI
  • 9. Input/Output ● Input functions (input()) allow users of a program to place values into programming code. ○ The parameter for an input function is called a prompt. This is a string (this can be indicated by “” or ‘’) such as “Enter a number: “ ○ The user’s response to the prompt will be returned to the input statement call as a string. To use this value as any other data type, it must be converted with another function (int()). ● Print functions (print()) allow programs to output strings to users on a given interface. ○ The parameter of this function is of any type. All types will automatically be converted to strings.
  • 10. If-else Statements ● If-else statements allow programmers to adapt the function of their code based on a given condition. ● If a given condition (i.e. x % 2 == 0) is true, then the statements following the if statement (if) will be executed. If the condition is false, the statements following the else statement (else) will be executed. ○ The condition is tested using the Boolean operators == (is equal to), != (is not equal to), and (used to test multiple conditions), and or (used to test if AT LEAST ONE condition is true). ○ Additionally, else-if statements (elif) can be used to provide unique coding statements for multiple conditions.
  • 11. For Loops ● For loops perform the same task (iterate) for the number of times specified by an iterable (something that can be evaluated repeatedly such as a list, string, or range). ● for defines the for loop ● x is the variable defining the number of times the statements within the loop (print(myInt)) are executed. ● The range(start, stop, step) function is often used to define x. ○ The starting value is defined by start, the final value is defined by stop – 1, and the magnitude at which x changes between loops is defined by step. ● in is a Boolean operator that returns true if the given value (x) is found within a given list, string, range etc.
  • 12. While Loops ● While loops are statements that iterate so long as a given Boolean condition is met. ○ x (the variable determining whether or not the condition is met) is defined and manipulated OUTSIDE of the header of the while loop (while) ○ The condition (x < 5) is a statement containing a Boolean variable. ○ break is a statement used to exit the current for/while loop. ○ continue is a statement used to reject all statements in the current for/while loop iteration and return to the beginning of the loop.
  • 13. Conclusion • Python is versatile and beginner-friendly • Key fundamentals: syntax, data types, control flow, and functions • Next steps: Explore advanced topics and libraries