SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
Data Types
● Integers (int) Immutable
● Floating Points (float) Immutable
● Booleans (bool) Immutable
● Strings (str) Immutable
● Lists Mutable
● Tuples ( constant list ) Immutable
● Dictionaries Mutable
Variables & Assignments
Variable represent labelled storage locations, whose values can be
manipulated during program run.
Roll_no = 41
Name = ‘Harsh’
**Python allows dynamic typing.
Mutable & Immutable Variables
Mutable Variables can change their value in place.
Immutable Variables never changes their values, they reference to a
value-object. When we change value the reference address changes.
Some Terms
def India( ):
. print(“Atma Nirbhar. ”)
#Boycott_China
a=5
b=a+3
print(b+a)
India( )
Comment
Statement
Indentation
Function
Expression
Function call
Block
Variable
Age = input( ‘Enter your age : ’) default input datatype is str.
print(Age)
print(‘My age is : ’ ,Age)
print(‘My’, ’name’, ’is’, ’Harsh’) My name is Harsh
print(‘My’, ’name’, ’is’, ’Harsh’ , sep=’!’) My!name!is!Harsh
Default separator is ‘space’
print(‘My’, ‘name’, ‘is’, ‘Harsh’ ,end=’-’) My name is Harsh-
Default end is ‘endline’
Input & Output
Type Casting (Very Important)
Conversion of one data type into another.
There are two types :
01. Implicit Type Casting :
A = 5.0
B = 4
C = A+B
02. Explicit Type Casting :
A = 5.0
B = int(A)

Mais conteúdo relacionado

Semelhante a Lecture-2.pdf

Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
valarpink
 
uom-2552-what-is-python-presentation (1).pptx
uom-2552-what-is-python-presentation (1).pptxuom-2552-what-is-python-presentation (1).pptx
uom-2552-what-is-python-presentation (1).pptx
Prabha Karan
 
variablesfinal-170820055428 data type results
variablesfinal-170820055428 data type resultsvariablesfinal-170820055428 data type results
variablesfinal-170820055428 data type results
atifmugheesv
 

Semelhante a Lecture-2.pdf (20)

COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdfCOMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
 
CS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdfCS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdf
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
 
uom-2552-what-is-python-presentation.pptx
uom-2552-what-is-python-presentation.pptxuom-2552-what-is-python-presentation.pptx
uom-2552-what-is-python-presentation.pptx
 
uom-2552-what-is-python-presentation (1).pptx
uom-2552-what-is-python-presentation (1).pptxuom-2552-what-is-python-presentation (1).pptx
uom-2552-what-is-python-presentation (1).pptx
 
Variables&DataTypes.pptx
Variables&DataTypes.pptxVariables&DataTypes.pptx
Variables&DataTypes.pptx
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
Python Essentials - PICT.pdf
Python Essentials - PICT.pdfPython Essentials - PICT.pdf
Python Essentials - PICT.pdf
 
Chapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteChapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B Kute
 
Variables Scope and Values Programming .pptx
Variables Scope and Values Programming .pptxVariables Scope and Values Programming .pptx
Variables Scope and Values Programming .pptx
 
Python Programming | JNTUK | UNIT 1 | Lecture 4
Python Programming | JNTUK | UNIT 1 | Lecture 4Python Programming | JNTUK | UNIT 1 | Lecture 4
Python Programming | JNTUK | UNIT 1 | Lecture 4
 
Chapter7-Introduction to Python.pptx
Chapter7-Introduction to Python.pptxChapter7-Introduction to Python.pptx
Chapter7-Introduction to Python.pptx
 
Python
PythonPython
Python
 
Python ppt
Python pptPython ppt
Python ppt
 
OOP-java-variables.pptx
OOP-java-variables.pptxOOP-java-variables.pptx
OOP-java-variables.pptx
 
C Programming Language Step by Step Part 3
C Programming Language Step by Step Part 3C Programming Language Step by Step Part 3
C Programming Language Step by Step Part 3
 
Computer programming 2 Lesson 5
Computer programming 2  Lesson 5Computer programming 2  Lesson 5
Computer programming 2 Lesson 5
 
introduction to python
 introduction to python introduction to python
introduction to python
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
 
variablesfinal-170820055428 data type results
variablesfinal-170820055428 data type resultsvariablesfinal-170820055428 data type results
variablesfinal-170820055428 data type results
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Lecture-2.pdf

  • 1. Data Types ● Integers (int) Immutable ● Floating Points (float) Immutable ● Booleans (bool) Immutable ● Strings (str) Immutable ● Lists Mutable ● Tuples ( constant list ) Immutable ● Dictionaries Mutable
  • 2. Variables & Assignments Variable represent labelled storage locations, whose values can be manipulated during program run. Roll_no = 41 Name = ‘Harsh’ **Python allows dynamic typing.
  • 3. Mutable & Immutable Variables Mutable Variables can change their value in place. Immutable Variables never changes their values, they reference to a value-object. When we change value the reference address changes.
  • 4. Some Terms def India( ): . print(“Atma Nirbhar. ”) #Boycott_China a=5 b=a+3 print(b+a) India( ) Comment Statement Indentation Function Expression Function call Block Variable
  • 5. Age = input( ‘Enter your age : ’) default input datatype is str. print(Age) print(‘My age is : ’ ,Age) print(‘My’, ’name’, ’is’, ’Harsh’) My name is Harsh print(‘My’, ’name’, ’is’, ’Harsh’ , sep=’!’) My!name!is!Harsh Default separator is ‘space’ print(‘My’, ‘name’, ‘is’, ‘Harsh’ ,end=’-’) My name is Harsh- Default end is ‘endline’ Input & Output
  • 6. Type Casting (Very Important) Conversion of one data type into another. There are two types : 01. Implicit Type Casting : A = 5.0 B = 4 C = A+B 02. Explicit Type Casting : A = 5.0 B = int(A)