Events Add an event Speakers Talks Collections
 
FOSSASIA Summit 2021
March 20, 2021, Online, Singapore
FOSSASIA Summit 2021
Request Q&A
FOSSASIA Summit 2021
From the conference
FOSSASIA Summit 2021
Request Q&A
Video
Introduction to Python Programming
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Add to favorites
10
I like 0
I dislike 0
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
  • Description
  • Transcript
  • Discussion

About the talk

In this session we will cover

  • Programming using Python  

  • Use of Command Line Interface

  • Use of Git & GitHub Web Scraping

  • Build your first API

  • Build your first Web App

  • Deploy your Web App

About speakers

Shyam Sridhar
Research Intern at Ethereum Foundation
Bryce Goh
Student at Singapore University of Technology and Design
Raphael Yee
Student at Singapore University of Technology and Design
Divy Chandra
Student at Singapore University of Technology and Design
Share

The speed of light code in Python right to have an ID requirements that need to download. So you can send the link that you can download and install. you go to this website, you can download You seem a bit too many days on your computer, and you run. Call 888-901-9992. What you have to do is once you can start by, then you can also install a Reese food to since you already have this second page. And you can download I don't know which way you can. I mean, it wasn't

so. once you have a real sport install, you can proceed Oh okay, that's what's up. You can use any idea of your choice. okay, so I proceed once you have your ID set up and by then install start with the sessions and two is too to do anything in a program like you need a conscience and any value That Remains the Same throughout the execution of the program is known as if it really is a constant. It doesn't change. And example would be a constant because numbers don't change. Then we have Miracles and we

are like boxes that you used to store Constance inside. So it's it's a container that you can put one constant in two, and then you can take it out and put another one in if you wanted to change it to available. Is if the value that can change during the execution of the program, because the members like a boss, put something and you can pick something out and you can change it as many times as you like, And if an example of using have to, I have to tend to my

name. And I Caden C on my TV and instead he is a 20.5 and B together, okay? So to be able to see what these variables actually, the value of the, so do use this function, call the print and you like the name of the label inside and show you. The regular, you can use the button to coffee pot, if you want to test it and you can press it into your life. And if you're using Can you please put into your ID to call? Send files to? Basically, you can make a python file by making a new file and then you can write any name that you want here, and extension

should be a. So when you create a text file and you have. Exe, but you will try to work. If you don't see your extensions, that you will have to click View and then click on this check. Okay, so once you have your bored face it into food, you can open the folder and I want to see inside a folder, you can go to the back of the pipes DMV and I'll bring up and listen to down in the mood for bison. Do you have any questions? Regarding how to open a command prompt? Please let me know. Open

YouTube. Yes, to you. You go to the folder in which you're fighting violence are located in so that this folder. To. Once you have your phone, you exit the apartment. It's easy to stop fighting or it can be different for you, but you take care and then you press enter and it'll bring up the command prompt. Okay, so once you have a command from Tampa to VSP save to do you type by 10, for me is best. To any particular program, I just went over it. It's I'm taking two variables that are assigned, 10 and

20 and then I add an assignment. so first, I had them together, I print them and then I subtract them and then Princeton cancel. You can also be restoring numbers, right? You can also, if you want to store a word or a sentence, you can also do that. And you use a tablet to write a word to anyone to write a word or phrase or sentence that you do use your sign. Whenever you want to meet. if I now run this program, the value that I type in your sentences or phrases of words that I type in a program, they are known as strings. This variable

is known as a string. You can also make list for 5 a.m. So if you want to store multiple variables, then use this kind of a notation that you light squared. To remember they like boxers that two values to defend Australian if you want to store requires a different type of container to be student to issue. I know in Piketon you don't they don't have to be the same data type. So if this one it doesn't give me any other. You can have multiple types. I don't

usually need any other programming language, like, Java allowed to do this, but Two different types of values in them so you can store in Macon. Store has changed a different type of plastic bag. Need a water bottle to store water inside and Harmony, and Peyton is known as a data, type 2. You're each of you has has a data type associated with it which describes what kind of value in stores. Two different data type for today because the remaining two are kind of the school, but

the first one is an integer to an indeed account. Is any value that can be negative, or positive as 0. So it doesn't have any sections or decimal number, have a point five on a point or something like that. Then you have floating Point values. To floating Point values are valued at in store, fractional Parts as well. So you can have 1.5 or 2.5 windows are all starting point tracking And if you have any questions and please ask, it's not that one. Then you have Boolean

values to. So, basically is used for when a computer needs to answer yes or no question. So I asked, do you have a pen and you either have it or you don't have to say yes or you say no? So when a computer needs to answer yes or no question is uses of Boolean. So so Bonita types are quite important conditions and like all of programming. So we'll be taking a look at conditions later on. If you have any questions, please, and I'll move on. And it is a string is also a

word or phrase and string is always enclosed by a double perks. You can also assign a strain if you want. Then you used to do that to you. To, you can do that by using what. So, if I have a n, i c. I want the first character of the screen and that gives me the first one is because I'm programming in general. In any programming, language is a list or any number or any order. List in programming, city starts with 0, it start with one so in a list or inner strength or in any other day that I needed it starts with 0. OK. Google

first one is in the second character. Three or two ways that are character trees, the fourth character and so on that make sense. And in person that you can also have negative indexes. So if you want to get the see the last character of the strength to use an index of -1, and you can use my character and so on. If you wants to obtain a particular part of the characters, for two characters, 8, then you can do that using what's call string slicing? So this is the same as using stop streaming in any

other programming language has yet to you use slicing and use the same kind of notation that you do it and you say that is I have a string then I think this is you It starts the string from the food, V character of the string and it ends at the 9th character of the string. So you need to remember that it starts at 1 and the last thing is not included in the results. So if you do this, the best changed then the sun will always start from this and end this, but it's not in the end is not included, so that

make sense And if you wanted to take a part of a string that starts at some point but ends at the end of the world, the last number, the second number and it'll start at the book character the string and and you just don't say, you don't specify where it has planned and just take the rest of the day. So this one Start from the start, from the, from the food character and goes all the way to the end. And so, if you get this part of the string, and if you want me to take apart of the string that starts at the start, at the beginning and end at a point before the end of this thing,

then you can view of the string that starts at the beginning and ends at whichever position is so this one starts at zero and then it ends at the 6 character takes this much of this thing that makes Okay. So you can also if you want to but if you let directors from the string in a particular you want to pick the first, then you can do that by buying a card number in your sinks license. And this one will start at the till the 10th character listing and get a V2 characters. So when you do this

You will get the cut character than the 6 character. Then you'll get the name character and Daniel empty cuz he has to be at the 10th character, that make sense. You can make me. This is quite useful to start m. I n. Can you use minus one for the third value? Be interesting when you get reversed. So it's the same thing but it starts at the end and goes all the way back so you get this thing but it's actually reversed. And lastly, with things if you want to know how long a particular strain is, is how many characters does thing has, and you can use the line function

in private and it gives you the length of the string bought this one, it has a length of 24 characters. and if you ever have any questions, please ask and If you are the best way to learn these things as to try it yourself. So if you ever find that you don't understand something, you should always copy the code and then check it out for yourself, like, right and play around with the code, a little bit, change the value, see how the food. And if, so if you want, you can join multiple strings together

to form one stream and This is known as string concatenation to you. Just use a plus sign on it, joins the strings together. I have mice and I use the plus sign to join them together and I get the full sentence, which is This is known as string concatenation. Hey, Sue. What would happen if you try to accept a position of a string that is larger than its length to say, are you? You tried to access the 20th or 21st. They didn't see that thing in Texas. 10 in 1, 2 lists, and lists is basically a list of an order collection of different

constant variables. In each member of a list is formerly known as an element to. For example, this is a list and it has numbers and values have strings inside, so I can have it as well, and value of a list gets assigned and index in the second round. Next one, the third value, which is this is a list. The strain is index 2 and 1/2, every value in a list. And in general, when you in July, that list is, the list is too long to fit in in one line. Like this is not easy to read the list. Write a good practice is to write out the list

with the elements separated out in multiple lines, to do it all the time. But it's good thing to do when is too long to read in one line. To list, similarly to how things work in piping. So you can use in Texas to get the values of the string. Exactly, that's exactly the same. So you can you use some strips to zero and get to the first element and -1 when you get to the last element and also works exactly the same way. So, it was exactly like how our Spring Works.

If you want to combine two list together, you can do our mornings together. You can use that gives you one big list. Call Peter. And I just get one list with all those pics. Hey, if you want to add an element to a list, you can do that using the app and function for the list to use this kid at the end of the list. Tonight, I miss you see that to you. You can choose the size of a list to invite, and that's not the case. In fact they can do a particular size.

And what elements do we want? It doesn't have to be perfect spank. and if you have to list and using operation on a new list, Surplus operation on the list, to get a new list, the remaining. If you want to, you can, you can you, can you extend function of the list at 10, and then you buy the name of the second list at 1 to add to this, to me. And then I'm right, this second list added to it as well. so, I guess or are you okay? And it looks the same way when you try to access an element of a list that Is out of

that, is more than the length of the list, if you have a list. Rights for time, you try to access. An element that has not let it snow. Exactly. So you can only get one that has a single element to the list, a list titled work, and I'll give it a list that say And 1920 something like that. And I Rhombus. I didn't think the value. And I file on this, then you see whatever you happen to ask the list, it'll extend. Ben Franklin, you won't be Then we have two bills in patents. YouTubers are exactly like exactly like a list. The only difference between us

is that you can change their values fancy initials them to improve, which means once you declare it once you have not changed it again. and once again, it's the same thing with the less, if you have a long to be able to reach Airport, Elements from a tube is exactly like how it was. The first one is inside and then you want to update a single element from the list you you can you do that exactly the same way that it was. So surprising with exactly the same way and like everything else is just the same

Yes. And one interesting thing to note here is that why you can change the injured values inside a Google, modify the value. So if I, if you see the last element of my list and I if I wanted to, I could change the value of that list and it would actually work. Yeah, this is not something that comes up. This is like the only exception to the rule that you can't change values. Lastly, we have dictionaries. So dictionary is in person, basically, store at Valley Fair. So they create a

map between If it's unclear right now, you can also write this in one line, but usually it's always, you write the value on the left is is known as is known as the value. And basically what this does is it. Now while you can use integers you can use other teeth. Are you confused or List as a teenager? You can send you the list in the value of 2. when you do get a dictionary like this, you can access their value. As in Nexus to look similar to an index that starts with 0 1 2 3.

if I run this and you can lose almost every kind of value inside a decree as a key, you can however use I tried to do that, then it says that I'm hatchable type. Just means that you confuse list inside a discovery as a key used the last of the value. If you want to go, see I Stay this would work because if you can use lettuce as values, you see the list appears in the output to Use a dictionary. You you have, if you have a key and you have a is associated value, And you try to

access an element in the big city. 101 in my dictionary, what's going to happen? It's going to give me an error. If I try to use the one that says glo1, this means that there's no Another way to obtain values from a dictionary to use a cricket function, so you can do get back their Associated value. If you specify a key and it's not found in the dictionary, then your default values used instead, instead, does that make sense? Go to be talked about the most common data types in type in, if you have available and you want to know which day that I belongs to,

you can do that using the time. So you write a Skype, when you give it away and it tells you which it at I press to. It's a strange that princess Dr. The second one is a float float. The third one is a list of friends list. The fourth one is a name Peter zabinski Hamilton. we'll come to that later on to this tells you which data type Elementary gave it belongs to, that make sense. when you write a program that you must follow, and These rules that respect by the

programming language that you absolutely have to follow when you like Babel names and their inventions as well that they are like they do not set in stone. You don't exactly have to follow the conventions but it's good practice to follow the conventions, to follow their, the first for a peaceful rules. So you can only use a letters numbers and on this post. So you can use one, two, three, or any numbers that you want to work. This is a valid video. We make this would work without any issues then. So

if you need a reasonable name, that starts with the number, then it is already. Give me another. Like, when you do that to give me a hint. You can you write my name in a sentence is a different variables and capital. Both of these variables, that different values. Maybelline's are case sensitive and they must not be any words in which have specific meaning, you been using it as a very building where that would not be connect. Wendy's are the laws are rules that you absolutely must follow

that. It's nice because it looked a variable name is conventional to just use a small small letter or something like that. If you spell to use an underscore, Do you like all of your different words in small letters are separated by underscores? And when you're writing a variable name, that supposed to be a constant or a value that you don't intend to change any use all capital letters golden ratio, you have all capital letters, you don't use small letters. of course if you wanted to you could

use for letter as well but it's nice to all of these connections between that patient in dka so if I if you want to write code, then you should use proper names that tell you what, should be descriptive and it should be like, people should be able to Okay, let's move on to operators in items to tighten office. Seven different types of operators, R6 of them today. One of them is a bit out of the scope for today session interested, you can look it up and

read it after I read about it on your own operators for operation that he can perform is arithmetic, is numbers, you should be able to so you can do a ditions fraction multiplication division. you can add to the integer Division and something that has a marginal in all of these one by one edition is Simple, it add to a list together, so they could give me 15, then is, would X values and division would use, and division, is the quotient of a division. So, if I do,

I'll be in by 6. So give me to Because that's the quotient of the division. So physically, yeah. Yeah, exactly. Did it get rid of the floating point. So if you need any other programming language, you don't have any normal division works like that and keep you have to specify when it has to be either one of the simplest. Go to the example. So then you can do you have to model of operation, which gives you it gives you the remainder of the division and the last one is exponentiation, so you can Yeah, it's the big me.

The second number. And I get. The first one is Edition is 50 in the second one, subtraction, multiplication and division. The division, give me this one. Give me 2.5. So it give me the precise answer, The Division II 17 by 6 if I did normal. If I didn't know, Melinda Vision on that, it'll give me the precise value is 2.8 3. 3, 3 digit division, it gets rid of the part, and, yes, it is me Destiny 2, but it doesn't sound off. So if you just get rid of the

floating part, completely They're muddy, no operation of the division. So when you do 10%, 6/8 divide 10 by 6 and the value of operation, 5, ^ 2, which is 25, okay, if you have any questions and please think it should be Call. Well, what's your question? Sorry. So, if you have no question then I'll move away. Any have relational operators in passing relational? Operators are basically. I have to be able to, I want to find out if a vehicle is larger than you can use at least two

questions, like is a greater than b is equal to be answered. So you can rest if I get false Set a time store questions for operations that use bouillon to the time. I could also say is 5 less than six and yes that's true so it'll give me an answer of 2/5 relation of riches as well to you can do you can do greater than or equal to You can do less than or equal to do. You could use You can use a. Equal to Double Eagle II which Cricket except two numbers are equal and you can

use not equal to which check the two numbers are not equal to each other. To recap the greater than or equal to operation tells you if one number is either greater or equal to another number. The less than a number is less than or equal to another one day W. Equal operation to values and checks if they're equal or not. And the last one. The opposite sex, if two values are not equal to each other. I get to call tickets 5 is not greater than 610 is less than 11 so yeah I get to then 10 is greater than or equal

to 2/8 equal to 10 so I guess it's true. Then to is less than equal to 11 so I get to 10 to 10 so I get to Helen. 10:11 is not equal to 10 so I also get to Yes, sterilization of British word for Strings as well. So if you use a string relational operators, then it basically tells you if the shoes are in alphabetical order alphabetical comes before we get to And then sleepy. You can use our relation of bridges for sorting values in a list or operations. So,

in by 10 and is basically, is asking two questions. And seeing if both have to see, you can say, Write an email to Someone Like You need to have to have a computer and you need to have an active internet connection. So active internet, you must have been. And so whenever there are things or other must all be together, then we use 10, so you play a video game, you need to own a computer so that means that you can use You can come by to do something, you must have a pencil or a bet. So,

English language, different conditions. Then you can use a Boolean operation 5 + 10 + 6 + 47210 Beechwood. If I see, alright, then only one of them needs to be too far for me to get the results soon as I speak to you is not greater than 4 but still, it will work because v s m 6. So either one of the conditions can be true and the owner would give me to give me a true. Look up my conditions with fall through, like six is not less than 592, greater than 4.

If you want to use that to invite, there's no XR or the Boolean and is used to check if you are more than reduce are simultaneously true. And you use it like that. You just can't beat that. You just talk and text. this is a, is is known as a combination of all the input and output values to do, all of the different values that can be, both of my values of all time, and be as false, if both of my value, or if one of my values and if I have both of my values are true, then

Moto E4, or however, many variables at 8, and b, and c a b, c d. So you can try writing and writing table for four table. If you have, if you want to try writing it, then that you have 16 different in different combinations of input and output Paris. And then we have the Boolean or operations and it says you should check if one or more of the given values. Are you can use it Like A or B & L, A N D. so if you write down every combination of the inputs and outputs for a or b, you can write

about yours at 8 and stay or not like that. That's incorrect. But Use or a or b. And if you have both of us, if any one of the values is true, then the result is true. And it's also, true is only one of the values needs to be true and again, or just one, so I can have pizza in five or two less than four or four bigger than two, and one of them needs to be to make sense. These are his example to type them out. So, But now, instead of using values in their commission, I'm using the same thing.

Less than Diesel 10 Easton. Beast 2022. That's true. And that is also true. I get into any system where you figure out for the rest of them and there's membership operator. So, basically membership operators are used to test if a certain sequence is present in an object. For example, if you have a character on a string and you want to find out if they occur in another string, then you can use these membership operations. Water. It occurs in water bottles to the first condition is to the second one. Not in,

what about what about rights and the next one, SpongeBob SquarePants that will give you a call. First thing doesn't give you two because SpongeBob Aspire. Hey, these values out then. Can you see the first one is true. The second one is false. The third one is false and the last one. Open Urban Dictionary. So, if you want to find out, if a specified value, is in a dick, in a list, what are the dictionary to write the value of the gift is It's a few or not. So it's

the last to the first one. Second one of the second to give you true, it has to be not around. You does that make sense? Not in that. Then it'll give me to last one, give me to buy. It's not, it's not. That makes sense, right? Membership operations. And you have an assignment and shorten Diamond operations. Is he what these are is, can you use that? You could equal to 10 lb, not mathematically, quality statement. That's not a mathematical equality statements. Say something

like is equal to a plus then that's actually an assignment. What this means is that you add 10 to a m m u r sign the value today. So if I went the value of a boat before and have my assignment, and give me some of that sign meant Chris is not a mathematical statement. to invite, when you have seven different types of allow you to the same thing that I right here, but it's more Compact and it is known as short and operation so I can write a plus equals to

This message is also going to a 10 to 8, so if I drink again from I can * 749, * / to let me give me five. I can use integer division as well. And if I had of value lesson 7, Can you use model S model. S to. So you have one. So basically for every shot an operation, this is equivalent to a + b. So it works like that that make sense. There are two more types of operators in Bible identity of operations, and operations of today session. So I'm not even going to ask. If you are interested, you can look them up.

Okay, not available and operations. Most important person who can do something in activity that you're doing that. I would need to make decisions if you have, if you forget to bring your air conditioning unit, based on your first statement in Patton to accomplish is to Let's see, I have to be here at 10 at equal to 10. MB is equal to 20, and I want to see if Abby is greater than day or not. If it is, I do something. If it's not then I do something else. okay, so just kind of a this is their

use Abreva and programming with a anytime that you need to make a decision. So for example, I said I wanted to find the maximum given number, then I can do that using using high-speed. My maximum is a, this is new for now because I don't know what's going to be the next month. It's going to be 8, otherwise it's going to be be. Strange devalue. Tell me which variable has the maximum volume? I get to one now from Jason's and if statements, please it is important

that you understand them properly, and Don't. Usually when you write a statement and Elsa fence, do you need to provide to the airport in Fort Pierce? Open what what comes under that has to have more underneath the instant? I don't know which one, and which ones outside the hell, it doesn't know. Right? That is under the L and the prince doesn't make sense. Like which part of the code? Some thing might belong to the maximum is under the And sometimes you can also use two spaces to give an impatiens, but usually four is more popular for fighting.

Then you can have an if that doesn't have any else statement attached to it so you can have it and if that's just so you can check, if a value is greater than another one and then you do something, if it's not then you don't do anything. So I send you because right now is 35. Change the value. So that now it's the other way around. Nothing happens. School. If you felt and what if you have multiple conditions that you need to check? So let's say you have one condition and you if that's true you need to do one thing.

If you have another condition that's true then you need to do another thing. So you have, you see if B is greater than 8 and you print a beast than it is equal to 22. Is short for answers to you. Is if neither of these are true, then you do this to To Sunrise you can use Elsa's to compare a lot of different conditions and make the make whatever choice you want in your program using is used to select a branch of instructions that you want your computer to follow, whichever conditions that you give to it as true or not. So he doesn't need to be

just trees can have as many Alice as you want, so you can add another one as many as you want. I know that, you know about because it can you write a program that would print the maximum of three even answered with a solution, but you don't look like so. I have equal to something, we close to another variable and C is equal to 31. also, another thing to note is in 5 minutes, if you want to take a number as an input, from the person that's turning your input input and enter the first timer,

And then the second one. And when you do this, you'll get whatever value that the user and just so you can. So I can enter 15 in another countries for and I can enter and see it and then numbers. So you can, you can write programs from the user. Doesn't have to be in the program. when you think this important, it is given the variables of spring is the time to do a operation unamused Prep, High School. The first High School, convert them to pin to English

converter to the integer value. If you use the float function, then It converts the string to upload, or I need. so now, if I run the program again and I type in my values, Going to be display. To know it's a problem. When you're ready the solution, we can move on. Okay, if you've managed to write the solution and let's take a look at the answer. So, Tri-City using a n l seafood and that should say, at least not else if that's wrong. Sou EU right? When it starts to burn. The maximum

maximum is the maximum number. If not, the maximum that can be, the maximum one of them has to be, if to find out the maximum of three numbers, Hey, let me come to you and you again and play to Duke's. It is quite something that you you you you do in everyday life has been so the times when you want to repeat that and you kind of playing a game and boss fight or something and you're not managing to pass the level that you see why you're not defeated the Boston, you try again. So while you

stuck at 11, the two times table, Again, and again, and again. And again, you have these two things known as a wire Loop and a for Loop and Repeatedly executive Broncos school, as long as the foundation is true. So, it's something is true. The instructions inside. So, Or this one. While he's resting can keep running. What happen is the value of a become stamps? If you do this, give you all the numbers from 0. All the way tonight since I used it is less than 1010 is not included in

the final result because Dennis is not less than that is equal to 10. So under their condition outside, And it gives me time. So now that you know about the light, you can you print the following pattern? but time to figure it out on your own, if you really And wait for two more minutes. You can look at that. Okay, I think should move on if you managed to solve the problems and that's good. If not, I need to wait to do this, is you need to notice that the

amount by which you get 7. Then you at 4:11 at 5, you get 60 a bigger number. the way that you would drive, this is You also keep track of their increase and then you start at 1 and each time you increase the number of the increased and you increase the value itself as well. So, An important thing to type in Yukon concatenate a string and an integer. See if you have an integer and a string that you can remind them using the operation and that's what happened to you, you would need to convert

the string and you do that using the sbar function Now. Yes. Tillotson, 212r for Loop. For statement is a specific range of values in Python numbers in a particular statement. I can pay for, in range to, 23 and should be surestay, spr spr. So this one it's it starts at 2 and it ends at 8:22. So then the number to order a 2:22. So if I get the address and this one is Hebrews from 2 all the way to 22. And the next one is we can also go backwards if you want to go from 9876 on the way to see. Then you can

also do that one. Yes. I also have, but I forgot to specify going the opposite direction or in their opposite direction. You need to stay minus one in the steps to the range of values of stopping point and ending points. And it takes a step and tell you how much you add to the start and didn't get to the end and if you don't, then it's automatically to zinna's + 1. So if I did then it wouldn't work because it's So you need to specify minus one there. And this should give me reviews on the way.

Remind me to buy difilippo. So you can have any number as a step size here. So you can work some of that while slicing works but you can have Grandview. You get you get you get one. You can use any any kind of steps I that you would want to use zero on at 5 and go all the way. Or can be all you can also use for Loops to go through all the elements of a list. If you have a list, if you haven't, you think that's all. You will go through my wife. This one. It goes, it's just a tiny number

since the numbers, all the way to be. All the values in a tube and it's the same thing with a dictionary. Do you have a dictionary? Then you can go to all the keys. If you want to paint the values of the destiny, you don't have to actually give them if I used. I don't get the values. I just got, I just got the keys. A 3.14. I am Spongebob. So I don't get there. Go to get their value as well. You need to pacify. if you want to get the value and give you the values now,

This would give me all the values. And using the same way you can do dictionary. Please, if you want to get the key and the value you use, Items with review and it gives you the key. I could stay here keep, value and that would give me and I can print them out. This would give me the key animal. This make sense to, you can do this in person and backing out for a second. You can assign them to using unpacking so you can see. CM Punk. Get one, two, three. When you do the same

thing in the for Loop. Is it between the between the second one? Is the bats, all about loops and conditions and flow control and biotin remove on two functions. Is it a function at all? Swirling, bottom part of any programming language such as piping. So you watching TV and you want to change the channel on the TV. If you can get a new remote and set off writing it out, many times you write what the function. You can use the same piece of code anywhere that you want. So, For example, I have a program that

finds the maximum number in a list of 100 different place, and I want to find out. You, you you do that more effectively is using function. So Instead now you write the same court inside a function, and now you can use it as many times as you like to Line app to share, this is known as a functional prototype and it's it's, it's short for Define. So you defining a function here and Maxwell you, this is the name of the function. So you sing and defining a function that called

back swelling, and this Dixon a list of numbers to you, take in a list of numbers, which now you're not going to find them at Does make sense. And now you can find the maximum value in this list and once you find the maximum value, you use to whenever a function is called. So I copy this code in here. Now I have three different lists yet and I'll sign the maximum to find a maximum in each different list. All I need to do is call the function using the functions name and then I give it the list that I want to find the

maximum off. And it'll it'll like I don't have to rewrite the same court, three different time. You just use the function is more convenient to do. It also makes more money so this list and I want to start a list. If I write a code to start the list and it's not as effective. Because if somebody is beating of gold at a glance, then they'll have to understand and then they'll know that Sorting the list. But if you just drive list. Start really, really useful and

you should use them as much as you can when you write code. It'll find the three maximum values in the list, which has 88 in this one is 19 + 1 + 96 + 180 +. 90 + 96. 10 a function doesn't have to necessarily return a value if it doesn't need to have this return statement. So, Even having a limit you can have a function that just just does stuff but doesn't actually return a value. But this is just me to print out all the different list. I didn't save the fight. Large print out all of the different list. What is where do I get a non-real? You

here? I'm printing out on the list but none in my list. Why is there none here? This is because remember that the function is not returning anything. And I'm printing the value of the function. And when I do that, it it doesn't actually have anything to print because my function to return anything. So, it just means none because it doesn't have anything to print so you should remember that if a function doesn't have a return type or any returning statements, then It doesn't give you any

values. Also note that if you encounter a written statement anywhere in the function and the rest of it does not get executed. So as soon as you reach the return line, it it just keeps everything that comes after. So if I have this code and If I like this, then you just give me 10, which is it, that keeps everything that comes after the return statement. And that. Functions. And now that we know about functions, can you write a function to calculate the factorial of a number that you find the factorial of the first 20 numbers?

Interstate 5 minutes to try and do this problem. And if you don't know what, let's turn it up, till 1 would be 545, * 4, * 3, * 2 * 1. Factorial of 20 would be 20 *, 19, * 18, * 17, * 60. Okay, if you manage to solve the problem, then that's nice. If not then we go over the solution now. so, Bishop Navy, write a function that that's call factorial and it takes in available policy. And then we also Define and I call you say, or I in range of 1 to a plus, one to Bay

City, from 1 to whatever number that, you've been given to interacting X, you should use Number to be more Piya. now, it's going from one on the way to So it's going to multiply a number by, then your phone. Look, would look something like for I in range 1 to 6 and then this would be so initially I would be 101. Just one, then it would be become to apply to which would make it to. Then I will pick up treat, please, multiply to get 120. What? Text Ben. Yeah, I know you seen it. Since you look beautiful for doing this. I cannot read the function as many times as I like using the function. I

can find the factorial of all the numbers going from 1 to 20. Two functions are really useful when you want. Let me have tie pins. It functions. What type into espanol? I go function. Now you say you define a function that's called calculate BMI so he's going to find out the BMI and to find BMI you need the height of a person. Tight. So the high is going to be afloat so you can expect in Peter forward. So And by doing this, why the digitizer is important to give stipends for your phone? Because when other people used

to be able to know which kind of data types, they need to provide to your function night. So it's important when writing functions, A last-minute functions. So is Basically, it's a function and you call the same function inside of that functions. That is known as because you listen to stand recursion. By using the example, of the fact that -1 * 10 - 2 all the way to one, right? Similarly, if I light it up like this. Using this that you can likely. If you know if you know

this is quite useful because if you know what is five factorial is 24. Then you can find when can you have some pain that's defined in terms of itself is known as so, if you're introduced to the factorial for the first time, right? And somebody to call mission for you to calculate the factorial, Yeah, it doesn't tell you where to start, right? So you don't know what been to stop with this, so you can feel how do you stop? You don't know, right? So that's not all the information that you need to

complete the definition of 0 factorial is defined as to know, when, you know that you can say that for all set then, You would have that if you would die without a stopping point, you could just keep going and going and you don't know where to start but once you know the stopping point, you go all the way down. So you find 21.1 factorial Best Biscayne way. You need a stopping point for depression. This is known as the base case of your education to end. using this, you can find out if you if, you know the factorial of a smaller, the factorial of

the factorial of any number that you like, Best process of defining. All different sizes. And I can move the what? What song is this? I can show you all really nice. animation for if I can find animation that I have, Just here to assist the animation. Animation of talking about. Do you solve the problem for two discs? Now you moved and now you solve the problem once again, for the same process again. So now you again move to text. Call Elizabeth. 2, factorial, in terms of a recursive function is

the number Definition. Text, maybe walk through an example for this can be more clear. What's this piece of gold and you're not allowed to type this into your life? Turn to figure out what this would keep in mind that every time it goes into the operation after. 3 minutes to figure it out. Do this another time. How to remember that when? Can you call the thing that is doing but still continue with the code? That is. So when you thinking about this, Yes, that's my penis. That's correct. yeah, this is you ain't here

because when it doesn't That's how it work. Yeah, that's that's And with that income to the end of functions. I'm going to go over classes and objects. It is also important concepts for programming, and That's it you come across like a lot of different objects in your daily life. Each of Jack that you come across as a friend like you have different properties. It has different things that you can do. It has wedding in it, it has a size, it has some weight.

so, every object that you see in real life, right? It has some properties, it has some function to perform. It has some way to custom height as a material. That is made all objects are alike that. And what would you do if you wanted to know? How would you define its properties? How would you define what kind of function to object? Can execute to something like this? Let's see. I wanted to write a note. Check that happened in court. You might try writing something like

this fountain pen. Open my timer. Is it works for one bed, right? What if I wanted to make 100% pets? Can you write the same piece of code? 100 different times? That's not feasible. That doesn't make sense. so you can talk to a large number of objects and if you would like if you wanted to make some when the cold This is where the classes and objects coming to the picture. So, so, In integers floats list. All of these data types that we learned about, so

you can use them without having to design any classes for them or any object for them. But if you want to make your own day at a time, then you use a class. So, basically, the class is a, it is a custom data type and Yeah, it's good. That we move on to what classes are and how you want to make something more complicated or object properties of the object and object would look something like this. So this tells me that the pain. It has a color, it has a style that has a kind

and function call display information which shows that information Show me the show, me the color that size the time. Send this funny funny function that I have your underscore underscore underscore underscore. This thing is known as a distance tractor is essential for every blueprint to have a contractor because the construction of check without this won't be able to make objects in your class. So they say, you have a blueprint to make a bicycle that you could have created the bicycle. You can have the material

properties taking down on a blueprint, but you don't have the tools to make it, you don't have a wrench, you don't have a need to make Instructor is that you need to make an object and its required in a week. You also shows you all the information. 2. Remember that the class is just a blueprint for creating app and it tells us what what property and what functions it helps is not defend itself, directly create event. You would use the blueprints and you specify all of the properties, something like this. So

is this point? Five seconds is a marker and the owner's name is so now you make a pen or check like this. to when you do this, the fighting calls and says that you have to have the time and then if you want to see the information about the bank, you can use a display like this, show you all of the properties. so, I can copy the code. This was the first pen. Shows me the color that I use the time to. And no weight with me, but I have a class I want to make multiple objects, right? If I want to make, Four different objects and all I need to do is just use the same

syntax and I don't need to make a big Ben, which it is is quite tedious to do. If you wanted to make 100 much more efficient markers on the program. Give me, give me all the information. Wouldn't you say that's good? Looks really neat and nice because what's happening? What's happening to the code? If you would read somebody else's code? Is it is really modular Court. It just makes sense. Do you have any questions? You can do that for me. you can, you can make the

To use more pneumonic example. So right now, the class that we saw it, you did some break some conventions for something like this. When you define a notice, in the original class, in a Constructor, I use different video from the properties and I called the first visible in my instructor and a table. In my display information function, I call it conventionally in Piketon. You call the Call the first object and all of the property for the property as the one that the object has.

so, if you don't have it, What is the name of the home checks when writing the functions? Yeah, you should really follow these. Two conventions are important, and writing classes to with that. We have a practice test beans, mention properties. 3 minutes. Okay, if you manage to do that question and that's good. That means so Bad goal is to write a class with the following properties, to the bicycle or whatever color you should have a material. They should have

a size, which would have a height of the seat. It should have a Gerry issue, the diameter of the wheels and soul. Are you making a class that's all bicycle? And I need to sign the instructor for the class and the concept of these properties. It has a color in. Has a material that has a size You have a stye, is it has a height? It has a gear. Ratio is a diameter in other and then the two properties or does it have a basket and closet? To use the spouse. I could. Call Peter cunanan. You'd make an object is

a bicycle. and then you can give it that color red made of it's made of aluminium, and it has maybe your sister small bicycle then it has a height of 1 meter, maybe when you have a You have a Gerry issue, received alligator shift to the timing of the wheel could be. 10. Army. Final Fantasy X. Not so Call kichu height. Is 1.5 + and if I, I can change and I said that I knew. 0.5. So, you happen to be an issue before and after this function is going to be It's going to change to 4.5. How do I print the values?

Hey. So 901 what makes glasses? So good with two reusable song. the code is also more clear as to When you're cold and understand it, better Organization for the class because it's so much more nicer to have it as an object at 100. so, Is better with organization called something, for 1:55, to 3, something like this, and not. And I print a list my Mr. Duran, Show me something, terribly useful for that, and it's also. The same thing is, you don't need to know how this my phone is wired.

Internally, that you don't need to know how much fun even if you don't do that stuff. Is an incredibly useful concept and. Call. Tom Spencer, has its properties. I thought you would be able to cover because I ran out of time. The next part on your way and try to understand it. But the most important concepts for all of these kind of problems and learn more about How many questions you can ask? And if you come to the end of the session, Any textbook Bears website called w3schools.com.

Find a picture. I recommend this website. Can I have time to cover so much? Much much more efficient to learn by doing problems and trying to write code on your own problems. different questions online and try to try to get as much back to having an effective knowledge of Hey, babe, can you come to the end of the session on? Does this a QR code that you guys can scan or for something? I can find more information about a wide range of training courses and resources at the website. So if you were looking for a

probation violation, but you're not sure on Wednesday. Then you can speak with the skill. Future Singapore's asked to identify your skills and gain useful tips and advice on how to kick-start your skills to find out more about this.

Cackle comments for the website

Buy this talk

Access to the talk “Introduction to Python Programming”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Ticket

Get access to all videos “FOSSASIA Summit 2021”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Ticket

Interested in topic “Artificial Intelligence and Machine Learning”?

You might be interested in videos from this event

February 4 - 5, 2021
Online
26
147
ai, application, bot, chatbot, conversation, data, design, healthcare, ml

Similar talks

Michael Christen
Founder at SUSI.AI
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Hananto Wicaksono
MySQL Principal Solution Engineer at Oracle
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Areeb Jamal
Engineer at FOSSASIA
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Buy this video

Video
Access to the talk “Introduction to Python Programming”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Conference Cast

With ConferenceCast.tv, you get access to our library of the world's best conference talks.

Conference Cast
944 conferences
37487 speakers
14316 hours of content