SlideShare a Scribd company logo
1 of 12
Download to read offline
Running
the First
Program
in Pydroid:
How to Save a Program
After selecting a
folder into which
the file is to be
saved,
you can type a
suitable name for
the file and add
the extension .py
In the above program, we used a function called print.
The function's name - print - is followed by
parentheses containing zero or more arguments.
So in this example
print("Hello, World!")
there is one argument, which is "Hello, World!".
Note that this argument is a group of characters enclosed
in double quotes ("").
This is commonly referred to as a string of characters, or
string, for short.
Another example of a string is
"Jack and Jill went up a hill".
The combination of a function and parentheses
with the arguments is a function call.
A function and its arguments are one type of statement
that python has,
so
print("Hello, World!")
is an example of a statement.
Basically, you can think of a statement as a single line in
a program.
Arithmetic expressions
In this example,
print("2 + 2 is", 2+2)
The first argument is the string "2 + 2 is" and
the second argument is the arithmetic expression 2+2,
which is one kind of expression.
What is important to note is that a string is printed as
is (without the enclosing double quotes),
but an expression is evaluated, or converted to its
actual value.
Arithmetic expressions
In this example, the print function is followed by two
arguments, with each of the arguments separated by a
comma. So with the first line of the program
print("2 + 2 is", 2 + 2)
The first argument is the string "2 + 2 is" and the
second argument is the arithmetic expression 2 + 2,
which is one kind of expression.
What is important to note is that a string is printed as is
(without the enclosing double quotes), but an
expression is evaluated, or converted to its actual
Notice that there are two ways to do division,
one that returns the repeating decimal and
the other that can get the remainder and the whole
number.
The order of operations is the same as in math:
python- print function and arithmetic expressions

More Related Content

What's hot

Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structureeShikshak
 
Procedures And Functions in Matlab
Procedures And Functions in MatlabProcedures And Functions in Matlab
Procedures And Functions in MatlabDataminingTools Inc
 
ADT STACK and Queues
ADT STACK and QueuesADT STACK and Queues
ADT STACK and QueuesBHARATH KUMAR
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Balwant Gorad
 
1 intro
1 intro1 intro
1 introabha48
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2Abbott
 
Basic data structures in python
Basic data structures in pythonBasic data structures in python
Basic data structures in pythonCeline George
 
‘go-to’ general-purpose sequential collections - from Java To Scala
‘go-to’ general-purpose sequential collections -from Java To Scala‘go-to’ general-purpose sequential collections -from Java To Scala
‘go-to’ general-purpose sequential collections - from Java To ScalaPhilip Schwarz
 
List Data Structure
List Data StructureList Data Structure
List Data StructureZidny Nafan
 
PROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In PrologPROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In PrologDataminingTools Inc
 
DatumTron In-Memory Graph Database
DatumTron In-Memory Graph DatabaseDatumTron In-Memory Graph Database
DatumTron In-Memory Graph DatabaseAshraf Azmi
 
Computer science solution - programming - big c plus plus
Computer science   solution - programming - big c plus plusComputer science   solution - programming - big c plus plus
Computer science solution - programming - big c plus plusPraveen Tyagi
 

What's hot (20)

Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structure
 
Procedures And Functions in Matlab
Procedures And Functions in MatlabProcedures And Functions in Matlab
Procedures And Functions in Matlab
 
ADT STACK and Queues
ADT STACK and QueuesADT STACK and Queues
ADT STACK and Queues
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
 
1 intro
1 intro1 intro
1 intro
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2
 
L7
L7L7
L7
 
Binary Search
Binary SearchBinary Search
Binary Search
 
Data structure
Data structureData structure
Data structure
 
Basic data structures in python
Basic data structures in pythonBasic data structures in python
Basic data structures in python
 
‘go-to’ general-purpose sequential collections - from Java To Scala
‘go-to’ general-purpose sequential collections -from Java To Scala‘go-to’ general-purpose sequential collections -from Java To Scala
‘go-to’ general-purpose sequential collections - from Java To Scala
 
Algorithm and Programming (Searching)
Algorithm and Programming (Searching)Algorithm and Programming (Searching)
Algorithm and Programming (Searching)
 
List Data Structure
List Data StructureList Data Structure
List Data Structure
 
Link List
Link ListLink List
Link List
 
PROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In PrologPROLOG: Matching And Proof Search In Prolog
PROLOG: Matching And Proof Search In Prolog
 
DatumTron In-Memory Graph Database
DatumTron In-Memory Graph DatabaseDatumTron In-Memory Graph Database
DatumTron In-Memory Graph Database
 
Word games in c
Word games in cWord games in c
Word games in c
 
Linked list
Linked listLinked list
Linked list
 
E2
E2E2
E2
 
Computer science solution - programming - big c plus plus
Computer science   solution - programming - big c plus plusComputer science   solution - programming - big c plus plus
Computer science solution - programming - big c plus plus
 

Similar to python- print function and arithmetic expressions

Phyton Learning extracts
Phyton Learning extracts Phyton Learning extracts
Phyton Learning extracts Pavan Babu .G
 
function in python programming languges .pptx
function in python programming languges .pptxfunction in python programming languges .pptx
function in python programming languges .pptxrundalomary12
 
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.Meghaj Mallick
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materialsgayaramesh
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Twoamiable_indian
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & ImportMohd Sajjad
 
FUNCTIONINPYTHON.pptx
FUNCTIONINPYTHON.pptxFUNCTIONINPYTHON.pptx
FUNCTIONINPYTHON.pptxSheetalMavi2
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONvikram mahendra
 
Lesson7 incdecoperators
Lesson7 incdecoperatorsLesson7 incdecoperators
Lesson7 incdecoperatorsheartplusbrain
 
Amit user defined functions xi (2)
Amit  user defined functions xi (2)Amit  user defined functions xi (2)
Amit user defined functions xi (2)Arpit Meena
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMaheshPandit16
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab FunctionsUmer Azeem
 
Ap Power Point Chpt2
Ap Power Point Chpt2Ap Power Point Chpt2
Ap Power Point Chpt2dplunkett
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayUtkarsh Sengar
 
Functions in C++
Functions in C++Functions in C++
Functions in C++home
 
Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput Ahmad Idrees
 

Similar to python- print function and arithmetic expressions (20)

Python Objects
Python ObjectsPython Objects
Python Objects
 
Phyton Learning extracts
Phyton Learning extracts Phyton Learning extracts
Phyton Learning extracts
 
function in python programming languges .pptx
function in python programming languges .pptxfunction in python programming languges .pptx
function in python programming languges .pptx
 
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materials
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & Import
 
FUNCTIONINPYTHON.pptx
FUNCTIONINPYTHON.pptxFUNCTIONINPYTHON.pptx
FUNCTIONINPYTHON.pptx
 
Object-Oriented Programming Using C++
Object-Oriented Programming Using C++Object-Oriented Programming Using C++
Object-Oriented Programming Using C++
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
 
Lesson7 incdecoperators
Lesson7 incdecoperatorsLesson7 incdecoperators
Lesson7 incdecoperators
 
Amit user defined functions xi (2)
Amit  user defined functions xi (2)Amit  user defined functions xi (2)
Amit user defined functions xi (2)
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
 
Ap Power Point Chpt2
Ap Power Point Chpt2Ap Power Point Chpt2
Ap Power Point Chpt2
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
 
ch 2. Python module
ch 2. Python module ch 2. Python module
ch 2. Python module
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput
 

More from SreejaRamesh2

Syllabus for semester 3: complementary course in maths
Syllabus for semester 3: complementary course in mathsSyllabus for semester 3: complementary course in maths
Syllabus for semester 3: complementary course in mathsSreejaRamesh2
 
Pg s2 11.08.2021 d5 filters
Pg s2 11.08.2021 d5 filtersPg s2 11.08.2021 d5 filters
Pg s2 11.08.2021 d5 filtersSreejaRamesh2
 
Pg s2 30.07.2021 _d1
Pg s2 30.07.2021 _d1Pg s2 30.07.2021 _d1
Pg s2 30.07.2021 _d1SreejaRamesh2
 
questions on matrices part1
 questions on matrices part1 questions on matrices part1
questions on matrices part1SreejaRamesh2
 
Prove this proposition:
Prove this proposition: Prove this proposition:
Prove this proposition: SreejaRamesh2
 
Silver-Pohlig-Hellman Algorithm
Silver-Pohlig-Hellman AlgorithmSilver-Pohlig-Hellman Algorithm
Silver-Pohlig-Hellman AlgorithmSreejaRamesh2
 
Closed sets in metric spaces
Closed sets in metric spacesClosed sets in metric spaces
Closed sets in metric spacesSreejaRamesh2
 
Continuity- solved problems set 1
Continuity- solved problems set 1Continuity- solved problems set 1
Continuity- solved problems set 1SreejaRamesh2
 
Roots of Unity & Quadratic residues
Roots of Unity & Quadratic residuesRoots of Unity & Quadratic residues
Roots of Unity & Quadratic residuesSreejaRamesh2
 
finite fields of prime power order
finite fields of prime power orderfinite fields of prime power order
finite fields of prime power orderSreejaRamesh2
 
generator of a finite field exists
generator of a finite field existsgenerator of a finite field exists
generator of a finite field existsSreejaRamesh2
 
probability of generators
probability  of generatorsprobability  of generators
probability of generatorsSreejaRamesh2
 
Topologies on the Set of Real Numbers
Topologies on the Set of Real NumbersTopologies on the Set of Real Numbers
Topologies on the Set of Real NumbersSreejaRamesh2
 
Echelon form of a matrix
Echelon form of a matrixEchelon form of a matrix
Echelon form of a matrixSreejaRamesh2
 
python- Variables and data types
python- Variables and data typespython- Variables and data types
python- Variables and data typesSreejaRamesh2
 
Basic Topology- Syllabus
Basic Topology- SyllabusBasic Topology- Syllabus
Basic Topology- SyllabusSreejaRamesh2
 
Elementary Transformations of Matrices
Elementary Transformations of MatricesElementary Transformations of Matrices
Elementary Transformations of MatricesSreejaRamesh2
 
Rank of a matrix:::Definition
Rank of a matrix:::DefinitionRank of a matrix:::Definition
Rank of a matrix:::DefinitionSreejaRamesh2
 
Lagrange's Equation:: Solved Problems Set1
Lagrange's Equation:: Solved Problems Set1Lagrange's Equation:: Solved Problems Set1
Lagrange's Equation:: Solved Problems Set1SreejaRamesh2
 

More from SreejaRamesh2 (20)

Syllabus for semester 3: complementary course in maths
Syllabus for semester 3: complementary course in mathsSyllabus for semester 3: complementary course in maths
Syllabus for semester 3: complementary course in maths
 
Pg s2 11.08.2021 d5 filters
Pg s2 11.08.2021 d5 filtersPg s2 11.08.2021 d5 filters
Pg s2 11.08.2021 d5 filters
 
Pg s2 30.07.2021 _d1
Pg s2 30.07.2021 _d1Pg s2 30.07.2021 _d1
Pg s2 30.07.2021 _d1
 
questions on matrices part1
 questions on matrices part1 questions on matrices part1
questions on matrices part1
 
Prove this proposition:
Prove this proposition: Prove this proposition:
Prove this proposition:
 
Silver-Pohlig-Hellman Algorithm
Silver-Pohlig-Hellman AlgorithmSilver-Pohlig-Hellman Algorithm
Silver-Pohlig-Hellman Algorithm
 
Closed sets in metric spaces
Closed sets in metric spacesClosed sets in metric spaces
Closed sets in metric spaces
 
Continuity- solved problems set 1
Continuity- solved problems set 1Continuity- solved problems set 1
Continuity- solved problems set 1
 
Roots of Unity & Quadratic residues
Roots of Unity & Quadratic residuesRoots of Unity & Quadratic residues
Roots of Unity & Quadratic residues
 
finite fields of prime power order
finite fields of prime power orderfinite fields of prime power order
finite fields of prime power order
 
generator of a finite field exists
generator of a finite field existsgenerator of a finite field exists
generator of a finite field exists
 
probability of generators
probability  of generatorsprobability  of generators
probability of generators
 
Topologies on the Set of Real Numbers
Topologies on the Set of Real NumbersTopologies on the Set of Real Numbers
Topologies on the Set of Real Numbers
 
Echelon form of a matrix
Echelon form of a matrixEchelon form of a matrix
Echelon form of a matrix
 
python- Variables and data types
python- Variables and data typespython- Variables and data types
python- Variables and data types
 
Basic Topology- Syllabus
Basic Topology- SyllabusBasic Topology- Syllabus
Basic Topology- Syllabus
 
Elementary Transformations of Matrices
Elementary Transformations of MatricesElementary Transformations of Matrices
Elementary Transformations of Matrices
 
Rank of a matrix:::Definition
Rank of a matrix:::DefinitionRank of a matrix:::Definition
Rank of a matrix:::Definition
 
Lagrange's Equation:: Solved Problems Set1
Lagrange's Equation:: Solved Problems Set1Lagrange's Equation:: Solved Problems Set1
Lagrange's Equation:: Solved Problems Set1
 
I dc ch. 13.11.2020
I dc ch. 13.11.2020I dc ch. 13.11.2020
I dc ch. 13.11.2020
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

python- print function and arithmetic expressions

  • 1.
  • 2.
  • 4. How to Save a Program
  • 5. After selecting a folder into which the file is to be saved, you can type a suitable name for the file and add the extension .py
  • 6. In the above program, we used a function called print. The function's name - print - is followed by parentheses containing zero or more arguments. So in this example print("Hello, World!") there is one argument, which is "Hello, World!". Note that this argument is a group of characters enclosed in double quotes (""). This is commonly referred to as a string of characters, or string, for short.
  • 7. Another example of a string is "Jack and Jill went up a hill". The combination of a function and parentheses with the arguments is a function call. A function and its arguments are one type of statement that python has, so print("Hello, World!") is an example of a statement. Basically, you can think of a statement as a single line in a program.
  • 8. Arithmetic expressions In this example, print("2 + 2 is", 2+2) The first argument is the string "2 + 2 is" and the second argument is the arithmetic expression 2+2, which is one kind of expression. What is important to note is that a string is printed as is (without the enclosing double quotes), but an expression is evaluated, or converted to its actual value.
  • 9. Arithmetic expressions In this example, the print function is followed by two arguments, with each of the arguments separated by a comma. So with the first line of the program print("2 + 2 is", 2 + 2) The first argument is the string "2 + 2 is" and the second argument is the arithmetic expression 2 + 2, which is one kind of expression. What is important to note is that a string is printed as is (without the enclosing double quotes), but an expression is evaluated, or converted to its actual
  • 10.
  • 11. Notice that there are two ways to do division, one that returns the repeating decimal and the other that can get the remainder and the whole number. The order of operations is the same as in math: