Перейти к содержимому

Kotlin Functions in Pashto #2 | What is a Function?

CodeWithMk

0:00 / 0:00

Kotlin Functions in Pashto #2 | What is a Function?

15 просмотров · 9 дн. назад
CodeWithMk
18 подписчиков
15 просмотров · 9 дн. назад
Learn Kotlin functions in Pashto with easy examples! In this lesson, you will understand what a function is, why we use it, and how to write your own. This is lesson 2 of the Android development course in Pashto by CodeWithMk. Functions are one of the most important ideas in programming. Every Android app is built from functions, so understanding them well will make everything ahead much easier. We start with a simple idea: a function is like a juice machine. You put something in, press a button, and get something out. Then we write three short examples in Kotlin Playground, from the simplest function to one that takes input and gives back an answer. 📌 What you will learn: ✅ What a function is, explained with a simple real-life example ✅ The three parts of a function: name, input and output ✅ Why programmers use functions ✅ How to write a function without input ✅ How to write a function with input (parameters) ✅ How to write a function that gives back an answer (return) ⏱️ Chapters: 0:00 Introduction 0:30 What is a Function? 2:30 Parts of a Function 4:00 Why Use Functions? 5:00 Example 1: makeTea() 7:00 Example 2: Function with Input 9:00 Example 3: Function with Return 11:00 Summary and Homework 📝 Homework: Write a function called triple that takes a number and gives back that number multiplied by 3. Call it with 4 and print the answer. Share your code in the comments and I will check it. 🔗 Resources: Kotlin Playground: https://play.kotlinlang.org Previous lesson, Your First Kotlin Program: [link] 👨‍💻 About CodeWithMk: I am Muqtadir Khan, a professional Android developer with 7+ years of experience building banking and fintech apps. On CodeWithMk, I teach programming in Pashto, from Kotlin basics to building real Android apps with Jetpack Compose, step by step and completely free. New lessons every week. Subscribe and turn on notifications so you don't miss the next video! #KotlinPashto #KotlinFunctions #ProgrammingInPashto