SlideShare a Scribd company logo
This work is licensed under the Apache 2.0 License
Camp Composed
Session 1 - Intro to Kotlin
September 19th
This work is licensed under the Apache 2.0 License
Navaneeth K U
GDSC CCE App Development Lead
Session Lead
This work is licensed under the Apache 2.0 License
Welcome App Developers!
This work is licensed under the Apache 2.0 License
Kotlin is an open-source statically typed
programming language that targets the JVM,
Android, JavaScript and Native. It's developed
by JetBrains. It can be used on multiple
platforms
What is Kotlin?
This work is licensed under the Apache 2.0 License
It has a much simpler and shorter code than
Java's code for the same problem. As this
makes the language more human-readable, it
becomes easy to debug. Kotlin's code is much
smaller and streamlines the programming process,
in comparison to Java. It has null safety feature
built-in.
Why Kotlin?
This work is licensed under the Apache 2.0 License
The size of the Kotlin app takes less size as
compared to Flutter. Since Flutter is a UI tool,
so it needs third-party libraries and tools to
bridge a connection with the native
environment. It does not require third-party
libraries and tools to bridge a connection with
the native environment. Kotlin has better
performance than Flutter
Why Kotlin over Flutter?
Syntax
This work is licensed under the Apache 2.0 License
This work is licensed under the Apache 2.0 License
println()
println(), print() are the printing
statements in Kotlin.
print() for just printing on the screen
println() for appending a newline
at the end
This work is licensed under the Apache 2.0 License
Variables
In computer programming, there's the concept of
a variable, which is a container for a single piece
of data. You can envision it as a box that contains
a value.
The box has a label, which is the name of the
variable. By referring to the box by its name, you
have access to the value it holds.
This work is licensed under the Apache 2.0 License
Variable format
This work is licensed under the Apache 2.0 License
Use
Variables are used as placeholders in an
app which are replaced by information
You must declare a variable before using
it!
This work is licensed under the Apache 2.0 License
Example:
Here, { Name } is a variable
These article cards are made
By populating the variables
With useful data!
This work is licensed under the Apache 2.0 License
Data Types in Kotlin
This work is licensed under the Apache 2.0 License
Variables
You can use variables in a string using
string interpolation
Output
This work is licensed under the Apache 2.0 License
Variable coding convention
This work is licensed under the Apache 2.0 License
Comments
When coding, another good practice to follow is to add
comments that describe what the code is intended to do.
Comments can help people who read your code follow it
more easily. Two forward slash symbols, or //, indicate that
the text after it on the rest of the line is considered a
comment, so it isn't interpreted as code.
It's common practice to add a space
after the two forward slash symbols.
This work is licensed under the Apache 2.0 License
Comments
Single Line
Multi Line
This work is licensed under the Apache 2.0 License
Functions
• A function is a block of code which
only runs when it is called. You can
pass data, known as parameters, into
a function. Functions are used to
perform certain actions, and they are
also known as methods.
This work is licensed under the Apache 2.0 License
Functions
• Syntax
This work is licensed under the Apache 2.0 License
Functions
• Syntax
This work is licensed under the Apache 2.0 License
Functions
• Example Output
This work is licensed under the Apache 2.0 License
• Function with return type
This work is licensed under the Apache 2.0 License
Parameter Passed
This work is licensed under the Apache 2.0 License
Example
This work is licensed under the Apache 2.0 License
Variables
• var is used when you expect the
variable to change
• val is used when you do not expect
the variable to change
There are increment, decrement
operators just like in C language
This work is licensed under the Apache 2.0 License
THANK YOU!

More Related Content

Similar to Compose Camp Slide Deck Template.pptx

Android Study Jam Prior Prog S-2
Android Study Jam Prior Prog S-2Android Study Jam Prior Prog S-2
Android Study Jam Prior Prog S-2
DSCIGDTUW
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptx
takshilkunadia
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
RishiGandhi19
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
IshwariKulkarni6
 
Compose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptxCompose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptx
AmruthasriAmaravati
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience track
AshwinRaj57
 
Compose Camp S1.pptx
Compose Camp S1.pptxCompose Camp S1.pptx
Compose Camp S1.pptx
GDSCSIT
 
Compose Camp 2.pdf
Compose Camp 2.pdfCompose Camp 2.pdf
Compose Camp 2.pdf
AbhishekS325285
 
Compose Camp.pdf
Compose Camp.pdfCompose Camp.pdf
Compose Camp.pdf
AbhishekS325285
 
Compose Camp Session 1.pdf
Compose Camp Session 1.pdfCompose Camp Session 1.pdf
Compose Camp Session 1.pdf
AbhishekRajoraB20CS0
 
day1.docx
day1.docxday1.docx
day1.docx
LAKSHMANGAMERS
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptx
bcedsc
 
Android Study Jams - Session 3
Android Study Jams - Session 3Android Study Jams - Session 3
Android Study Jams - Session 3
SadhanaParameswaran
 
Compose #1.pptx
Compose #1.pptxCompose #1.pptx
Compose #1.pptx
PratheeGuesylearn
 
DSC ASEB Android Study Jams 2020: New to Programming 3
DSC ASEB Android Study Jams 2020: New to Programming 3DSC ASEB Android Study Jams 2020: New to Programming 3
DSC ASEB Android Study Jams 2020: New to Programming 3
Aravind V. Nair
 
GDSC_day_1.pptx
GDSC_day_1.pptxGDSC_day_1.pptx
GDSC_day_1.pptx
GDSCICOER
 
Compose Camp Slide Session 1
Compose Camp Slide Session 1Compose Camp Slide Session 1
Compose Camp Slide Session 1
AkshatBajpai12
 
Android Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slidesAndroid Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slides
Boston Android
 
Kubernetes for Java Developers
 Kubernetes for Java Developers Kubernetes for Java Developers
Kubernetes for Java Developers
Red Hat Developers
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
Rafael Benevides
 

Similar to Compose Camp Slide Deck Template.pptx (20)

Android Study Jam Prior Prog S-2
Android Study Jam Prior Prog S-2Android Study Jam Prior Prog S-2
Android Study Jam Prior Prog S-2
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptx
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
 
Compose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptxCompose Camp: Introduction to Kotlin.pptx
Compose Camp: Introduction to Kotlin.pptx
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience track
 
Compose Camp S1.pptx
Compose Camp S1.pptxCompose Camp S1.pptx
Compose Camp S1.pptx
 
Compose Camp 2.pdf
Compose Camp 2.pdfCompose Camp 2.pdf
Compose Camp 2.pdf
 
Compose Camp.pdf
Compose Camp.pdfCompose Camp.pdf
Compose Camp.pdf
 
Compose Camp Session 1.pdf
Compose Camp Session 1.pdfCompose Camp Session 1.pdf
Compose Camp Session 1.pdf
 
day1.docx
day1.docxday1.docx
day1.docx
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptx
 
Android Study Jams - Session 3
Android Study Jams - Session 3Android Study Jams - Session 3
Android Study Jams - Session 3
 
Compose #1.pptx
Compose #1.pptxCompose #1.pptx
Compose #1.pptx
 
DSC ASEB Android Study Jams 2020: New to Programming 3
DSC ASEB Android Study Jams 2020: New to Programming 3DSC ASEB Android Study Jams 2020: New to Programming 3
DSC ASEB Android Study Jams 2020: New to Programming 3
 
GDSC_day_1.pptx
GDSC_day_1.pptxGDSC_day_1.pptx
GDSC_day_1.pptx
 
Compose Camp Slide Session 1
Compose Camp Slide Session 1Compose Camp Slide Session 1
Compose Camp Slide Session 1
 
Android Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slidesAndroid Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slides
 
Kubernetes for Java Developers
 Kubernetes for Java Developers Kubernetes for Java Developers
Kubernetes for Java Developers
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
 

More from GoogleDeveloperStude1

Camp Composed Session 4.pptx
Camp Composed Session 4.pptxCamp Composed Session 4.pptx
Camp Composed Session 4.pptx
GoogleDeveloperStude1
 
composecampsession3.pptx
composecampsession3.pptxcomposecampsession3.pptx
composecampsession3.pptx
GoogleDeveloperStude1
 
Camp Composed Session 2.pptx
Camp Composed Session 2.pptxCamp Composed Session 2.pptx
Camp Composed Session 2.pptx
GoogleDeveloperStude1
 
GDSC CCE.pptx
GDSC CCE.pptxGDSC CCE.pptx
GDSC CCE.pptx
GoogleDeveloperStude1
 
Day 1 Session 2
Day 1 Session 2Day 1 Session 2
Day 1 Session 2
GoogleDeveloperStude1
 
Day 1 Session 1
Day 1 Session 1Day 1 Session 1
Day 1 Session 1
GoogleDeveloperStude1
 

More from GoogleDeveloperStude1 (6)

Camp Composed Session 4.pptx
Camp Composed Session 4.pptxCamp Composed Session 4.pptx
Camp Composed Session 4.pptx
 
composecampsession3.pptx
composecampsession3.pptxcomposecampsession3.pptx
composecampsession3.pptx
 
Camp Composed Session 2.pptx
Camp Composed Session 2.pptxCamp Composed Session 2.pptx
Camp Composed Session 2.pptx
 
GDSC CCE.pptx
GDSC CCE.pptxGDSC CCE.pptx
GDSC CCE.pptx
 
Day 1 Session 2
Day 1 Session 2Day 1 Session 2
Day 1 Session 2
 
Day 1 Session 1
Day 1 Session 1Day 1 Session 1
Day 1 Session 1
 

Recently uploaded

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 

Compose Camp Slide Deck Template.pptx

  • 1. This work is licensed under the Apache 2.0 License Camp Composed Session 1 - Intro to Kotlin September 19th
  • 2. This work is licensed under the Apache 2.0 License Navaneeth K U GDSC CCE App Development Lead Session Lead
  • 3. This work is licensed under the Apache 2.0 License Welcome App Developers!
  • 4. This work is licensed under the Apache 2.0 License Kotlin is an open-source statically typed programming language that targets the JVM, Android, JavaScript and Native. It's developed by JetBrains. It can be used on multiple platforms What is Kotlin?
  • 5. This work is licensed under the Apache 2.0 License It has a much simpler and shorter code than Java's code for the same problem. As this makes the language more human-readable, it becomes easy to debug. Kotlin's code is much smaller and streamlines the programming process, in comparison to Java. It has null safety feature built-in. Why Kotlin?
  • 6. This work is licensed under the Apache 2.0 License The size of the Kotlin app takes less size as compared to Flutter. Since Flutter is a UI tool, so it needs third-party libraries and tools to bridge a connection with the native environment. It does not require third-party libraries and tools to bridge a connection with the native environment. Kotlin has better performance than Flutter Why Kotlin over Flutter?
  • 7. Syntax This work is licensed under the Apache 2.0 License
  • 8. This work is licensed under the Apache 2.0 License println() println(), print() are the printing statements in Kotlin. print() for just printing on the screen println() for appending a newline at the end
  • 9. This work is licensed under the Apache 2.0 License Variables In computer programming, there's the concept of a variable, which is a container for a single piece of data. You can envision it as a box that contains a value. The box has a label, which is the name of the variable. By referring to the box by its name, you have access to the value it holds.
  • 10. This work is licensed under the Apache 2.0 License Variable format
  • 11. This work is licensed under the Apache 2.0 License Use Variables are used as placeholders in an app which are replaced by information You must declare a variable before using it!
  • 12. This work is licensed under the Apache 2.0 License Example: Here, { Name } is a variable These article cards are made By populating the variables With useful data!
  • 13. This work is licensed under the Apache 2.0 License Data Types in Kotlin
  • 14. This work is licensed under the Apache 2.0 License Variables You can use variables in a string using string interpolation Output
  • 15. This work is licensed under the Apache 2.0 License Variable coding convention
  • 16. This work is licensed under the Apache 2.0 License Comments When coding, another good practice to follow is to add comments that describe what the code is intended to do. Comments can help people who read your code follow it more easily. Two forward slash symbols, or //, indicate that the text after it on the rest of the line is considered a comment, so it isn't interpreted as code. It's common practice to add a space after the two forward slash symbols.
  • 17. This work is licensed under the Apache 2.0 License Comments Single Line Multi Line
  • 18. This work is licensed under the Apache 2.0 License Functions • A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. Functions are used to perform certain actions, and they are also known as methods.
  • 19. This work is licensed under the Apache 2.0 License Functions • Syntax
  • 20. This work is licensed under the Apache 2.0 License Functions • Syntax
  • 21. This work is licensed under the Apache 2.0 License Functions • Example Output
  • 22. This work is licensed under the Apache 2.0 License • Function with return type
  • 23. This work is licensed under the Apache 2.0 License Parameter Passed
  • 24. This work is licensed under the Apache 2.0 License Example
  • 25. This work is licensed under the Apache 2.0 License Variables • var is used when you expect the variable to change • val is used when you do not expect the variable to change There are increment, decrement operators just like in C language
  • 26. This work is licensed under the Apache 2.0 License THANK YOU!