SlideShare a Scribd company logo
PART 1
VARIABLES AND DATA
TYPES IN PYTHON
• PART 0 – Installing python and syllabus
• Playlist link in description
• WANT TO LEARN PYTHON PROGRAMMING? (SUBTITLES)
• SUBSCRIBE
• TELEGRAM – FreeCodeSchool
• Twitter – shivammitra4
• LinkedIn – shivammitra
• Link in description
CONTENT
• What are variables ?
• String data type
• Numerical data type
• Examples
VARIABLES IN MATHS
• A symbol used to represent a numerical value
which can change
• 2x = y + 1 ( Algebra )
• x = 1, y = 1
• x = 2, y = 3
• Ten years from now, Rohit will be three times older
than he is today. What is his current age?
WHAT ARE VARIABLES
• Variables are used to store data
• These data are stored in main memory when you
run the program
• Programming = data + logic
• Different data types in python
• Numbers
• Strings
• Lists
• Tuple
• Dictionary
A SIMPLE EXAMPLE
• What is print() here ?
• What does it do ?
WHAT ARE FUNCTIONS IN MATHS
?
• Takes inputs and gives an output depending on the
input
• f(x) = x^2
• f(1) = 1
• f(2) = 4
• Programming functions also do the same.
• Takes input and returns output ( not always )
• Many built-in functions are present in python
• print() is one example – prints the input on screen
• More about functions in a separate video
WHY SHOULD I USE VARIABLES ?
• Using variables makes programs simpler
• Reduces repeated work
Naming Variables
• Can you give any name to the variables ?
• What are errors ?
WHAT ARE ERRORS IN PYTHON ?
• My name is Shivam vs Is name Shivam my ?
• My nam is Shivam vs My name is Shivam ?
• My name are Shivam vs My name is Shivam ?
• Every language has a syntax or a set of rules to
follow while writing it
• Python also has a syntax
• If you do not follow it, you will get errors.
• More about ”errors in python” in a separate video
RULES FOR NAMING
VARIABLES
RULE 1 - Variable names can contain only letters,
numbers, and underscores. They can start with a
letter or an underscore, but not with a number.
SUPPOSE YOU WANT TO WRITE TWO DIFFERENT MESSAGES ?
PART 1 - Python Tutorial | Variables and Data Types in Python
RULE 2 - Spaces are not allowed in variable names,
but underscores can be used to separate words in
variable names.
RULE 3 - Avoid using Python keywords and function
names as variable names; that is, do not use words
that Python has reserved for a particular
programmatic purpose, such as the word print.
WHAT ARE KEYWORDS IN PYTHON?
• These are reserved words in python which are used
to define the syntax of python language.
• In English, “is”, “the”, “you” etc. are reserved words
which defines the grammar.
• Keywords have different meaning for Python
language.
• Do not use them in your variables or function
names.
LIST OF KEYWORDS IN PYTHON
PART 1 - Python Tutorial | Variables and Data Types in Python
BUILT-IN FUNCTIONS IN PYTHON
SOME OTHER IMPORTANT POINTS TO
NOTE
• Variable names should be short but descriptive.
• name is better than writing n
• message is better than writing m or my_name_message
• Be careful when using the lowercase letter l and the
uppercase letter O because they could be confused
with the numbers 1 and 0.
It can take some practice to learn how to create good
variable names, especially as your programs become
more interesting and complicated. As you write more
programs and start to read through other people’s
code, you’ll get better at coming up with meaningful
names.
AVOIDING NAME ERRORS WHEN
USING VARIABLES
FINDING THE DATA TYPE OF A
VARIABLE
• Use type() built-in function
STRINGS DATA TYPE
WHAT ARE STRINGS ?
• A string is a series of characters
• Characters – alphabets, digits, special characters,
white spaces
• Anything inside quotes is considered a string in
Python
• You can use single or double quotes around your
strings
PART 1 - Python Tutorial | Variables and Data Types in Python
PART 1 - Python Tutorial | Variables and Data Types in Python
SINGLE QUOTE VS DOUBLE
QUOTE ?
• You can use any of these
• Be consistent
• Exceptions – print these text on screen:
• The language 'Python' is named after Monty Python, not
the snake.
• I told my friend, "Python is my favorite language!"
ASSIGNMENT: Try to find out if it is possible to print first message by using single quotes and second by using double quotes
and how ?
BUILT-IN FUNCTIONS
ASSOCIATED WITH
STRINGS
UPPER/LOWER FUNCTION
• print() vs message.lower()
• These built-in functions are specific to strings.
• print() is specific to multiple data types
• The dot(.) operator acts on the variable and
converts it into upper/lower cases
• The original data doesn’t change
TITLE FUNCTION
• Converts the first character of each word into
upper case
LEN FUNCTION
• Outputs the length of the string
• A single character is of length 1
• Characters can be alphabets or digits or
punctuation or white spaces
STRIP FUNCTIONS – strip(),
lstrip(), rstrip()
• Remove the extra whitespaces from a string
rstrip() – remove whitespace at
right end
lstrip() – remove whitespace from
left end
strip() – remove spaces from both
ends
USING VARIABLES
INSIDE A STRING
COMBINE THESE TWO TO
PRODUCE FULL NAME
Use f-strings
• Feature is available from python 3.6
• Start string with f – f stands for format
• Put braces around variable name
PART 1 - Python Tutorial | Variables and Data Types in Python
PART 1 - Python Tutorial | Variables and Data Types in Python
CONCAT MULTIPLE STRINGS
Adding Whitespace to Strings with
Tabs or Newlines
• In programming, whitespace refers to any
nonprinting character, such as spaces, tabs, and
end-of-line symbols.
• You can use whitespace to organize your output so
it’s easier for users to read.
Add a tab to your text
Add newline to your text
NUMBERS DATA TYPE
What are numbers ?
• Integers = 1, 2, 3
• Floats = 1.2, 2.55
• These data are used very frequently in a program.
INTEGERS
• You can add, subtract, multiply and divide python
integers
PART 1 - Python Tutorial | Variables and Data Types in Python
• Python uses two multiplication symbols to
represent exponents.
MULTIPLE OPERATORS IN ONE
EXPRESSION
• The spacing in these examples has no effect on how
Python evaluates the expressions
• Clarity
• More about precedence of operators in a future
video
FLOATS
• Python calls any number with a decimal point
a float.
• This term is used in most programming languages,
and it refers to the fact that a decimal point can
appear at any position in a number.
• Example: 1.2, 12.35
PART 1 - Python Tutorial | Variables and Data Types in Python
This happens in all languages and is of little concern. Python tries to find
a way to represent the result as precisely as possible, which is
sometimes difficult given how computers have to represent numbers
internally.
USE ROUND FUNCTION
INTEGERS AND FLOATS
DATA TYPE CONVERSION
MULTIPLE ASSIGNMENTS
• You can assign values to more than one variable
using just a single line.
• This can help shorten your programs and make
them easier to read.
• You’ll use this technique most often when
initializing a set of numbers.
CONSTANTS IN PYTHON
• A constant is like a variable whose value stays the
same throughout the life of a program.
• Python doesn’t have built-in constant types, but
Python programmers use all capital letters to
indicate a variable should be treated as a constant
and never be changed.
LISTS IN PYTHON

More Related Content

What's hot (20)

PPTX
Part 2 - Python Tutorial | Introduction to Lists
Shivam Mitra
 
PPTX
PART 7 - Python Tutorial | Dictionaries In Python With Examples
Shivam Mitra
 
PPTX
FLOW OF CONTROL-NESTED IFS IN PYTHON
vikram mahendra
 
PPTX
PART 3 - Python Tutorial | For Loop In Python With Examples
Shivam Mitra
 
PDF
Python Basics | Python Tutorial | Edureka
Edureka!
 
PDF
Python-03| Data types
Mohd Sajjad
 
PDF
Variables & Data Types In Python | Edureka
Edureka!
 
PPTX
Python variables and data types.pptx
AkshayAggarwal79
 
PPTX
Beginning Python Programming
St. Petersburg College
 
PPT
Introduction to Python
Nowell Strite
 
PPTX
PART 4 - Python Tutorial | If Else In Python With Examples
Shivam Mitra
 
PPTX
Benefits & features of python |Advantages & disadvantages of python
paradisetechsoftsolutions
 
PPTX
Loops in Python.pptx
Guru Nanak Dev University, Amritsar
 
PPTX
Intro to Python Programming Language
Dipankar Achinta
 
PPT
Stack a Data Structure
ForwardBlog Enewzletter
 
PPTX
Python final presentation kirti ppt1
Kirti Verma
 
PPTX
Presentation on data preparation with pandas
AkshitaKanther
 
PPT
Introduction to python
Syed Zaid Irshad
 
Part 2 - Python Tutorial | Introduction to Lists
Shivam Mitra
 
PART 7 - Python Tutorial | Dictionaries In Python With Examples
Shivam Mitra
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
vikram mahendra
 
PART 3 - Python Tutorial | For Loop In Python With Examples
Shivam Mitra
 
Python Basics | Python Tutorial | Edureka
Edureka!
 
Python-03| Data types
Mohd Sajjad
 
Variables & Data Types In Python | Edureka
Edureka!
 
Python variables and data types.pptx
AkshayAggarwal79
 
Beginning Python Programming
St. Petersburg College
 
Introduction to Python
Nowell Strite
 
PART 4 - Python Tutorial | If Else In Python With Examples
Shivam Mitra
 
Benefits & features of python |Advantages & disadvantages of python
paradisetechsoftsolutions
 
Intro to Python Programming Language
Dipankar Achinta
 
Stack a Data Structure
ForwardBlog Enewzletter
 
Python final presentation kirti ppt1
Kirti Verma
 
Presentation on data preparation with pandas
AkshitaKanther
 
Introduction to python
Syed Zaid Irshad
 

Similar to PART 1 - Python Tutorial | Variables and Data Types in Python (20)

PPTX
VARIABLES AND DATA TYPES IN PYTHON NEED TO STUDY
Rushikesh Kolhe
 
PPTX
20BCT23 – PYTHON PROGRAMMING.pptx
gokilabrindha
 
PPTX
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
PDF
Python Data Types
athithanvijay
 
PPTX
Fundamentals of Python Programming
Kamal Acharya
 
PDF
Python Programming
Saravanan T.M
 
PPTX
BASICS OF PYTHON usefull for the student who would like to learn on their own
Nandini485510
 
PPTX
Python_Modullllllle_2-_AFV._Funda-1.pptx
tissot723
 
PPTX
Basics of Python Programming
ManishJha237
 
PPTX
Python Programming 1.pptx
Francis Densil Raj
 
PDF
Copy_of_Programming_Fundamentals_CSC_104__-_Session_3.pdf
faridafatawu07
 
PPTX
python_class.pptx
chandankumar943868
 
PPTX
CODING WITH PYTHON PART 1
Buxoo Abdullah
 
PPTX
Python 01.pptx
AliMohammadAmiri
 
PPTX
parts_of_python_programming_language.pptx
Koteswari Kasireddy
 
PPTX
Python for beginner, learn python from scratch.pptx
olieee2023
 
PDF
Pythonintro
Hardik Malhotra
 
PPTX
#Code2Create: Python Basics
GDGKuwaitGoogleDevel
 
PPTX
Python Data Types with realistical approach.pptx
MuhammadUmar890FETBS
 
PDF
AmI 2015 - Python basics
Luigi De Russis
 
VARIABLES AND DATA TYPES IN PYTHON NEED TO STUDY
Rushikesh Kolhe
 
20BCT23 – PYTHON PROGRAMMING.pptx
gokilabrindha
 
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
Python Data Types
athithanvijay
 
Fundamentals of Python Programming
Kamal Acharya
 
Python Programming
Saravanan T.M
 
BASICS OF PYTHON usefull for the student who would like to learn on their own
Nandini485510
 
Python_Modullllllle_2-_AFV._Funda-1.pptx
tissot723
 
Basics of Python Programming
ManishJha237
 
Python Programming 1.pptx
Francis Densil Raj
 
Copy_of_Programming_Fundamentals_CSC_104__-_Session_3.pdf
faridafatawu07
 
python_class.pptx
chandankumar943868
 
CODING WITH PYTHON PART 1
Buxoo Abdullah
 
Python 01.pptx
AliMohammadAmiri
 
parts_of_python_programming_language.pptx
Koteswari Kasireddy
 
Python for beginner, learn python from scratch.pptx
olieee2023
 
Pythonintro
Hardik Malhotra
 
#Code2Create: Python Basics
GDGKuwaitGoogleDevel
 
Python Data Types with realistical approach.pptx
MuhammadUmar890FETBS
 
AmI 2015 - Python basics
Luigi De Russis
 
Ad

More from Shivam Mitra (17)

PPTX
Preparing for SRE Interviews
Shivam Mitra
 
PPTX
PART 9 - Python Tutorial | While Loop In Python With Examples
Shivam Mitra
 
PPTX
PART 8 - Python Tutorial | User Input In Python With Examples
Shivam Mitra
 
PPTX
PART 6 - Python Tutorial | Tuples In Python With Examples
Shivam Mitra
 
PPTX
PART 10 - Python Tutorial | Functions In Python With Examples
Shivam Mitra
 
PPTX
PART 0 - Python Tutorial | Why should you learn python
Shivam Mitra
 
PPTX
Memory management in operating system | Paging | Virtual memory
Shivam Mitra
 
PPTX
Process Synchronization in operating system | mutex | semaphore | race condition
Shivam Mitra
 
PPTX
Process Scheduling Algorithms | Interviews | Operating system
Shivam Mitra
 
PPTX
Threads in Operating System | Multithreading | Interprocess Communication
Shivam Mitra
 
PPTX
Process management in operating system | process states | PCB | FORK() | Zomb...
Shivam Mitra
 
PPTX
Introduction to operating system, system calls and interrupts
Shivam Mitra
 
PPTX
What is Internet and How it Works
Shivam Mitra
 
PPTX
OSI Model Layers and Internet Protocol Stack
Shivam Mitra
 
PPTX
Basics of Stock Market
Shivam Mitra
 
PPTX
Assets vs liability
Shivam Mitra
 
PPTX
Pycricbuzz - a python library to fetch live cricket scores
Shivam Mitra
 
Preparing for SRE Interviews
Shivam Mitra
 
PART 9 - Python Tutorial | While Loop In Python With Examples
Shivam Mitra
 
PART 8 - Python Tutorial | User Input In Python With Examples
Shivam Mitra
 
PART 6 - Python Tutorial | Tuples In Python With Examples
Shivam Mitra
 
PART 10 - Python Tutorial | Functions In Python With Examples
Shivam Mitra
 
PART 0 - Python Tutorial | Why should you learn python
Shivam Mitra
 
Memory management in operating system | Paging | Virtual memory
Shivam Mitra
 
Process Synchronization in operating system | mutex | semaphore | race condition
Shivam Mitra
 
Process Scheduling Algorithms | Interviews | Operating system
Shivam Mitra
 
Threads in Operating System | Multithreading | Interprocess Communication
Shivam Mitra
 
Process management in operating system | process states | PCB | FORK() | Zomb...
Shivam Mitra
 
Introduction to operating system, system calls and interrupts
Shivam Mitra
 
What is Internet and How it Works
Shivam Mitra
 
OSI Model Layers and Internet Protocol Stack
Shivam Mitra
 
Basics of Stock Market
Shivam Mitra
 
Assets vs liability
Shivam Mitra
 
Pycricbuzz - a python library to fetch live cricket scores
Shivam Mitra
 
Ad

Recently uploaded (20)

PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PDF
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Dimensions of Societal Planning in Commonism
StefanMz
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 

PART 1 - Python Tutorial | Variables and Data Types in Python

  • 1. PART 1 VARIABLES AND DATA TYPES IN PYTHON • PART 0 – Installing python and syllabus • Playlist link in description • WANT TO LEARN PYTHON PROGRAMMING? (SUBTITLES) • SUBSCRIBE • TELEGRAM – FreeCodeSchool • Twitter – shivammitra4 • LinkedIn – shivammitra • Link in description
  • 2. CONTENT • What are variables ? • String data type • Numerical data type • Examples
  • 3. VARIABLES IN MATHS • A symbol used to represent a numerical value which can change • 2x = y + 1 ( Algebra ) • x = 1, y = 1 • x = 2, y = 3 • Ten years from now, Rohit will be three times older than he is today. What is his current age?
  • 4. WHAT ARE VARIABLES • Variables are used to store data • These data are stored in main memory when you run the program • Programming = data + logic • Different data types in python • Numbers • Strings • Lists • Tuple • Dictionary
  • 5. A SIMPLE EXAMPLE • What is print() here ? • What does it do ?
  • 6. WHAT ARE FUNCTIONS IN MATHS ? • Takes inputs and gives an output depending on the input • f(x) = x^2 • f(1) = 1 • f(2) = 4 • Programming functions also do the same. • Takes input and returns output ( not always ) • Many built-in functions are present in python • print() is one example – prints the input on screen • More about functions in a separate video
  • 7. WHY SHOULD I USE VARIABLES ?
  • 8. • Using variables makes programs simpler • Reduces repeated work
  • 9. Naming Variables • Can you give any name to the variables ? • What are errors ?
  • 10. WHAT ARE ERRORS IN PYTHON ? • My name is Shivam vs Is name Shivam my ? • My nam is Shivam vs My name is Shivam ? • My name are Shivam vs My name is Shivam ? • Every language has a syntax or a set of rules to follow while writing it • Python also has a syntax • If you do not follow it, you will get errors. • More about ”errors in python” in a separate video
  • 12. RULE 1 - Variable names can contain only letters, numbers, and underscores. They can start with a letter or an underscore, but not with a number.
  • 13. SUPPOSE YOU WANT TO WRITE TWO DIFFERENT MESSAGES ?
  • 15. RULE 2 - Spaces are not allowed in variable names, but underscores can be used to separate words in variable names.
  • 16. RULE 3 - Avoid using Python keywords and function names as variable names; that is, do not use words that Python has reserved for a particular programmatic purpose, such as the word print.
  • 17. WHAT ARE KEYWORDS IN PYTHON? • These are reserved words in python which are used to define the syntax of python language. • In English, “is”, “the”, “you” etc. are reserved words which defines the grammar. • Keywords have different meaning for Python language. • Do not use them in your variables or function names.
  • 18. LIST OF KEYWORDS IN PYTHON
  • 21. SOME OTHER IMPORTANT POINTS TO NOTE • Variable names should be short but descriptive. • name is better than writing n • message is better than writing m or my_name_message • Be careful when using the lowercase letter l and the uppercase letter O because they could be confused with the numbers 1 and 0.
  • 22. It can take some practice to learn how to create good variable names, especially as your programs become more interesting and complicated. As you write more programs and start to read through other people’s code, you’ll get better at coming up with meaningful names.
  • 23. AVOIDING NAME ERRORS WHEN USING VARIABLES
  • 24. FINDING THE DATA TYPE OF A VARIABLE • Use type() built-in function
  • 26. WHAT ARE STRINGS ? • A string is a series of characters • Characters – alphabets, digits, special characters, white spaces • Anything inside quotes is considered a string in Python • You can use single or double quotes around your strings
  • 29. SINGLE QUOTE VS DOUBLE QUOTE ? • You can use any of these • Be consistent • Exceptions – print these text on screen: • The language 'Python' is named after Monty Python, not the snake. • I told my friend, "Python is my favorite language!"
  • 30. ASSIGNMENT: Try to find out if it is possible to print first message by using single quotes and second by using double quotes and how ?
  • 33. • print() vs message.lower() • These built-in functions are specific to strings. • print() is specific to multiple data types • The dot(.) operator acts on the variable and converts it into upper/lower cases • The original data doesn’t change
  • 34. TITLE FUNCTION • Converts the first character of each word into upper case
  • 35. LEN FUNCTION • Outputs the length of the string • A single character is of length 1 • Characters can be alphabets or digits or punctuation or white spaces
  • 36. STRIP FUNCTIONS – strip(), lstrip(), rstrip() • Remove the extra whitespaces from a string
  • 37. rstrip() – remove whitespace at right end
  • 38. lstrip() – remove whitespace from left end
  • 39. strip() – remove spaces from both ends
  • 41. COMBINE THESE TWO TO PRODUCE FULL NAME
  • 42. Use f-strings • Feature is available from python 3.6 • Start string with f – f stands for format • Put braces around variable name
  • 46. Adding Whitespace to Strings with Tabs or Newlines • In programming, whitespace refers to any nonprinting character, such as spaces, tabs, and end-of-line symbols. • You can use whitespace to organize your output so it’s easier for users to read.
  • 47. Add a tab to your text
  • 48. Add newline to your text
  • 50. What are numbers ? • Integers = 1, 2, 3 • Floats = 1.2, 2.55 • These data are used very frequently in a program.
  • 51. INTEGERS • You can add, subtract, multiply and divide python integers
  • 53. • Python uses two multiplication symbols to represent exponents.
  • 54. MULTIPLE OPERATORS IN ONE EXPRESSION
  • 55. • The spacing in these examples has no effect on how Python evaluates the expressions • Clarity • More about precedence of operators in a future video
  • 56. FLOATS • Python calls any number with a decimal point a float. • This term is used in most programming languages, and it refers to the fact that a decimal point can appear at any position in a number. • Example: 1.2, 12.35
  • 58. This happens in all languages and is of little concern. Python tries to find a way to represent the result as precisely as possible, which is sometimes difficult given how computers have to represent numbers internally.
  • 62. MULTIPLE ASSIGNMENTS • You can assign values to more than one variable using just a single line. • This can help shorten your programs and make them easier to read. • You’ll use this technique most often when initializing a set of numbers.
  • 63. CONSTANTS IN PYTHON • A constant is like a variable whose value stays the same throughout the life of a program. • Python doesn’t have built-in constant types, but Python programmers use all capital letters to indicate a variable should be treated as a constant and never be changed.