Day 1 of Android Development
Hello Everyone ,
This is my first day of my android development with kotlin language , There is so many videos course are available on the youtube and paid course are also but i choose google's course that is Android Basics with Compose in this course there is total 8 units , from basics to intermidiate level i think so , one of the main reason to choose this course is that i have limited time .
Before giving the reason why i had choosen this course let me introduce my self to you all ,
My name is Sawan kumar , student of class 11th , a IIT JEE aspirant preparing from offline coaching , Many of you will say that you should focus of your studies , I think is right i should focus on my studies but like coding every time i just started coding and quit at mid first time just code at last of my class with HTML language now you will say that HTML is not a programming language i know that this not a programming language this a markup language , then i always searching of best language or fast language etc. then i realise that every programming language has there own use so now decided to learn KOTLIN because google is promoting this language , i thought that i should master this language, i am unable to give more time on because of study and i don't have personal laptop or desktop because i am not at home , so i just code from my friend's laptop .
I'm unable to code daily but i will try to code .
Today is 14 July , i just cover 67% of Introduction to Kotlin
In this pathway i learnt
- println
- variables
- data types
- commenting
- functions
for this is enough today from next day i will also mention projects with their code
Project - 1
Gmail has a feature that sends a notification to the user whenever a login attempt is made on a new device.
fun main () {
val operatingSystem = "Chorme OS"
val emailId = "sawankumarroy0@gamil.com"
println(displayAlertMessage(operatingSystem, emailId))
}
fun displayAlertMessage(os : String, email : String) : String {
return "There's a new sign in request on $os for your Google Account $email ."
}
Project - 2
when unknown device will login
fun main () {
val operatingSystem = "Chorme OS"
val emailId = "sawankumarroy0@gmail.com"
println(displayAlertMessage(operatingSystem, emailId))
val secondOperatingSystem = "Android"
val secondEmailId = "sawankumarroy1@gmail.com"
println(displayAlertMessage(secondOperatingSystem,secondEmailId))
val thirdOperatingSystem = "Windows"
val thirdEmailId = "sample_email@gmail.com"
println(displayAlertMessage(thirdOperatingSystem,thirdEmailId))
val fourthEmailId = "sample_email_2@gmail.com"
println(displayAlertMessage(email = fourthEmailId))
}
fun displayAlertMessage(os : String = "Unkown OS", email : String) : String {
return "There's a new sign in request on $os for your Google Account $email ."
}
Project - 3
Pedometer
fun main() {
val Steps = 4000
val caloriesBurned = PEDOMETERstepsTOcalories(Steps);
println("Walking $Steps steps burns $caloriesBurned calories")
}
fun PEDOMETERstepsTOcalories(NumberOFStepS: Int): Double {
val CaloriesBURNEDforEachStep = 0.04
val TotalCALORIESburned = NumberOFStepS * CaloriesBURNEDforEachStep
return TotalCALORIESburned
}
Comments
Post a Comment