Computer Programming for Beginners (Java, Python, C#) | Artemakis Artemiou | Skillshare

Computer Programming for Beginners (Java, Python, C#)

Artemakis Artemiou, Awarded Database Expert, Trainer,Author.

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
15 Lessons (1h 38m) View My Notes
    • 1. Welcome to the Course!

    • 2. What Skills Does a Good Programmer Need to Have?

    • 3. About the Main Programming Principles

    • 4. Abstraction

    • 5. Algorithms

    • 6. Data Structures

    • 7. Functions

    • 8. Inheritance

    • 9. Loops

    • 10. Branch Logic

    • 11. Exception Handling

    • 12. C#

    • 13. Java

    • 14. Python

    • 15. Your Next Programming Language


About This Class

If you are just starting out with the exciting world of Computer Programming, then this class can help.

Via this class, you will learn the basic principles of Computer Programming, as well as, you will get introduced to the following Programming Languages:

  • C#
  • Java
  • Python

Besides from lectures, the class contains live demonstrations that will help you easily acquire new skills that have to do with Computer Programming.

Also, with the Class Project, you will be able to test what you've learned in this class.


1. Welcome to the Course!: color. One will come to my only course off computer programming. My name is half amongst immune and that be your instructor in this course it is. Course you will learn about their leadership between you and programming. That is how you can get started with programming. Also, you learn about the main problem principles and phantom Intel's, as well as about programming languages. More specifically, we're going to talk about the basic code construct in many programming languages and see how you can get started with him. Next, we're going to discuss about your post programming software engineering and in simple words , you learn the way off thinking That's the philosophy for writing computer programs as well as the main principles. The fundamentals. If you want about me, I miss you know she was servants after architect. I have over 15 years of experience with secrets ever Internet in development have bean imaginative platform every P for 90 years. I'm a professional author and speaker. Certified, See was an engineer and creator off single net happen and take how to now about the course requirements. The course has no requirements. After the course, you will have a better understanding of how proper it works and how you can easily get started with any programming language. You will know their fundamentals and main principles off programming. That's making it easier for you to become a good programmer. Israel, as you will be able to deep dive into the exciting world off computer programming. Great, let's begin. 2. What Skills Does a Good Programmer Need to Have?: So what skis do Good programs acquire? What are the right ingredients? Needs to become a good programmer. Well, to be a good programmer, you need to three types of skips. You need technical skills, people, skills and the machine intelligence. And you see that people skills in the martial intelligence will say that these are measure puzzles. The mindset. That mindset looks far more important than justice keys. Excuse required. Of course, Magnitsky's. But the mindset is not only technical skis. So what have taking US case? Technical skill is the ability to their conception methodologies to have strong on the legal problems of his kids. Have abstract thinking to have a good understanding. File cardinals and data structures to have knowledge of core programming, languages and knowledge off programming. Parad items. Now people skills courses off good communication, collaboration, skills and empathy that is putting herself in the shoes off your users. Now about emotional intelligence consists off willingness to stay up to date with the latest developments in the proper seen Toby. Passionate and excited for problem solving challenges to be creative, have humility, patience, self confidence and the other virtues. So let's discuss the necessity for these three types of skill sets. No one can argue that you need the technical ski sit. It's a must. If you don't have a technique, excuse it. You cannot do anything. But if you have only the technical ski set and you lack people skis and emotional intelligence, you can go on Lee up to a point. However, even combine Kananaskis people, skis and emotional intelligence, the sky's the limit. You can really evolved and, much worse, a programmer and be able to do many great things. 3. About the Main Programming Principles: So let's discuss, why do you need to know the main program principles? First, let's take a look. Which of the main partnering principles that this obstruction algorithms there's lectures, hair, towns, loops, branch logic and exception handling. So why do you need to know these principles? Because, first of all, you cannot just start writing code like that. If you just start writing coat without knowing these principles is just tired. Nearer, you will start writing code you will not right robust coat. You would most probably arrived repetitive Code writes inefficient code and actually called most probably would have too many deficiencies. Also, especially when we're talking about large software systems, you definitely need to know the principles because otherwise that's after that. You will most problem develop with black men of these principles inside in its implementation, moreover, would be able to develop software more efficiently. If you know the principles, you would be able to build scale of underpasses off their systems. That it is is there to be maintained and fair for developed and well as you will be able to solve complex problems much easier. So someone again might ask, Can't I just start asking cold and take it from there. Okay, let's discuss this. Yes, sure you can do that. You can play around. I started with programming by playing around, but this is not enough. If you're just playing around with a computer programming language. No one argues that you might end up knowing the specific programming language very well. But if you don't know the principles off programming and then even it who work within new programming language, how are you going to approach this challenge? You will just start playing around with this in new programming language and so forth. And so far, or if you know the principles, it would be much easier and more efficient for you to learn any programming language. Because the majority off computer programming languages and especially the general purpose Cochran language share the same principles, they might have different limitation. But the principles are the same, so it is very important to normal programming principles because I know the principal. This will help you evolve as a programmer in the proper way. So the next lectures we will talk extensively about the main partnering principles, staffing with obstruction 4. Abstraction: So what is obstruction? Abstraction? Computer programming. It's, well, no technique. It's a way off analyzing a problem by removing in background details and for bruising on the main concept. So these helps reducing complexity and allow sufficient software design so you can imagine having a complex problem to solve with a computer program. If you focus on all the details of this problem, it will be harder for you to thing off the solution. However, if you remove their details and focus on the core problem, it might be more easy for you to start visualising solution, and then you can at the other aspects off the problem to the solution. So this is an example off abstraction in C sharp programming language, and you can see I have defined an abstract class that is a vehicle class, and then I created in derived class based on the upstart class. So I have created a car that derives from vehicle. So in this class now I have implemented more detailed stuff. For example, I have created a new function that it authorizes existing function in my ups of class. That is a hate function, and this way I implemented something using obstruction. So first I care the absolute last idea in really no, let's say what these classes should re contain. And then I created the draft class and added more Plantation called. So let's see this simple obstruction They move in C sharp noted toe, get a better understanding off what abstract phonies. So this is the first step of the course. I would be showing abstraction in C sharp. This is my development environment of this micro visual studio, So I have created a C sharp concert medication. So as you can see, this is my absolute class, where I really defined many things just called vehicle, and I create a Napster function that this hate function that returns an integer So the next step is to create in the draft class based on the obstacle class. So, as you can see are located the car class, which is derived from from the vehicle. Plus. So in this draft class, I created a new invention off Kate function. So I defined again and the function and into the more coating it. So now I can run this program and are we creating new car class, object and I will call the head function, the head function returns and the teacher decent teacher is Start in these variable and I will be displaying these results off calling this function. So let's run our program. And as you can see, I can result that these the car paid 120 centimeters. Okay, now let's push it through the next lecture. 5. Algorithms: So now let's discuss about algorithms. What is that River on? The algorithm is a process that describes a solution to mostly a computational problem in step by step manner. So it is actually set off clear distractions, which, when followed this off, a problem these brings us to algorithmic. Thinking algorithmic thinking is a analyzing a problem rich solution based on a list of clear steps. It is the process off resolving a computational problem on paper by concluding remain algorithm. To be honest, this is how I worked to even have to solve a complex problem or if I want to developing. So for application, I don't just start writing or prototyping. I just get a piece of paper and start thinking the Alcor, Eva or the set off algorithms that would be solving the main part off the problem. So I use abstraction in orderto breaking problems into smaller parts and focus first on the court part with problem. And then I apply algorithmic thinking in order to write down a preliminary algorithm for resolving their core problem as well as other small algorithms for solving the other part of the problem. So let's see an example of algorithmic thinking. So we need our charism toe solve for the below problem using a cultural problem. So let's consider the problem the task off importing data from CSU file in twin deliveries table and report completion along with a total number of like or support it. So what should the album Don't be for this problem. The first step is to check if the file exists. Ive the file does not exist. Then our program must report an error and terminate the whole process. If they're file exist, then proceed to the next step that this step two Step two or presented at this connection. Then it opens the file for reading it. I'd had through each line loves step for, raided and imported into the Delery stable and upon each iteration, increase a counter by one even problem or cares that is an exception. Then the action is to report on error and terminate the process. Otherwise, a repeat until there are no more record unified and their last step is to report program completion. Okay, that was an example off, creating an algorithm for solving a simple problem using a computer program. Now let's jump to our next lecture that is, talk about data structures 6. Data Structures: another report on principle. Off computer programming are data structures. What is it their structure? The structure is constructed as a container that is used for story managing and organizing data during the applications. Runtime examples consist off Ari's linked lists, stocks, graphs and so one. All computer programs always work with some sort of data. The instructions made it possible for the rest of the programs. Logic toe work with this data. So you use the distractions in orderto start in data during the run time, and you access this data with other processes within your program in order to process them and apply your applications logic on this day that because there is not a single program that does not wear who some sort of data. That's why you need data structures. So a case study is a raise in C sharp united structure. You see sharp. You can start multiple variables off the same type. Another can be single dimensional math in dimensional or jacked examples. Off our raise, you can see below a narrative in teachers. We declare using this syntax in C sharp. So here I'm specifying amaria of integers with five positions for values as well as another of strings with again a size five. So each one of these two tables have five elements the festival can have in teachers, and the other one can have stinks. Okay, Now, let's proceed to another demo and see two examples off varies in C sharp. Okay. Eso again, we use Microsoft Visual Studio in order to work with our C sharp example. As you can see here, I have declared on our A off in teachers. So my IRA has five elements. And this way I access each position of the ray starting from zero, and I specify divide you forage position. Similarly, I'm declaring an area of strings and in similar way like above, I specify their values for each position off my IRA. Now I will, at a rate through or elements in my arrays and display them on screen. So we're going to discuss about loops that orations later. But for the sake of this example, I would like to show how we can retrieve information from an array I created to part of loops in orderto display the Vegas off my two arrays. So this coat goes through the area vintages and display the Vikas and the second for loop goes through the array of strings and splay. It's five as well. Okay, let's plan or programme and you can see that these are the values in my array of integers and these other vie girls in my array of strings. So in this example, I declared to arrays on array of integers, an array of strings. I populated the vitals of this race and with who iterations on displayed on screen the Vegas off these two arrays. 7. Functions: the next principal, we're going to discuss about our functions. What is a function Functions of block that contains code which can be reused whenever the function is called by its name. So these has many benefits. First of all, you can divide your program more meaningful and easy to maintain coal blocks. Then it has less complexity because you're at less quote via these re use exercise. And last but not least, your program's code is more relatable and easier to be maintained, and there's we're going to discuss about later. Maintenance is very important, so maintenance is a reason that you need right. Really readable coat and functions is something that can really help towards that, no less an exceptional off a function in c sharp. As you can see, you have my main function that these the main threat to be executed, and I have a function named Count to 10. No, these function has a for loop repetition off 10 times that each time it writes the number on the screen so it can't pretend, and the way you the function is in the main function toe, call it by its name. So I am a functional court. The faction is executed and the result is displayed on screen. Let's around this example in our a C sharp on development environment in visions with you. So this is how our example with function. So this is a function declaration. It is the same every so earlier in the lecture. So if we execute, it's called There will be a faction core and there's that will be displayed on screen. You can see counting to 10 starts from zero tonight actually starts from zero because initialized I with zero, I could initialize it with one. So now let's say we want to change this function to really start from counting from one and not zero. We go on in our affections declaration and here we can start. We want go on to 10. So let's compiler called and that I need again and you can see that now we're counting from 1 to 10. Okay, Now let's say we want toe count to 20 so it wouldn't have these factual would need to change the cold, but in orderto make it easier, we're going to other permitting more function. For example, how we got here a parameter that says the maximum number. So we change the 10 with parameter max number and in our function called we enter the number after which we won't our counting to stop. So let's say we enter their 20 again. We rebuilt our solution and we want and you can see that now it counted to 20 a small detail here. We can change this as well. Rebuild and you can see that the level here is correct. Two and our program now count to 20. You can do many things with functions you can skip, repeating the same coat or a similar code. You can use parameters in order to make functions more robust and do more things than just being a study. Implementation of quote. And they're really useful for writing, clean coat and official coat as well. Okay, let's proceed to the next lecture 8. Inheritance: in this lecture, we will talk about inheritance. What is the inheritance proper me inheritances when an object is based on another object and then here's its features, for example, properties. It is mainly used in object oriented programming. Now let's see a simple inherit his example. You can see here. I'm specifying my based class. We use very vehicle. The vehicle class has two functions. Two methods. If its method is called, start the second stop. It also has two properties to attribute the first article. This color in the second is Kate. Every constitutions, vicious and based class. I'm not declaring more specific attributes or methods, but as you can see, I have two classes that inherit the methods and other goods from the base class. That is every vehicle. Therefore, I have the car class, which has they start and stop matters as well. Seems it in heads from vehicle and also has the color and hate attributes. Now the important part here is that since I'm inheriting from vehicle, I have its methods and attributes, but also I cannot additional activities and methods, for example, in my car class. Besides, the start stop method is collar and hate attributes, I added a new attitude called total seatbelts. Similarly, have a second plaster, then heads from vehicle that is, the motorcycle class in which I have the methods start stop and the adequate colored. Okay. But I have also added a new article called Number of Wheels. Now let's further examine this example using sees her coat. As you can see, I have specified my based class that is, a vehicle class can see here the attributes here color as well as the two functions start and stop more of it. Consider here I have two constructors. There's something internal, so I'm just mentioning it now. I have also specified their car class and you can see here with a semi colon. I'm specifying that the car class inherits from the vehicle class, so I don't need to specify again the hate and color attributes. Neither the start and stop message, however, is conceived here. Um, adding a new attribute. Total seatbelts as well, less on additional method called display total seatbelts. Okay, now let's see these example live by working on a demo in C shop. So here we are, back in visual studio, where you can see that this is the definition of the base class is the vehicle class. You can see the articles here, the constructors as well as the two methods. Start and stop. Now let's see the car class which inherits from vehicle, and you can see that I have added another attribute called Total Seat Belt as well. Lessing. New method called Display Total Siebel's Now let's goto our main method of the program and use all that. So I'm creating a new object based on the car class. I'm naming these objects, see, So I'm specifying the athletics for this option. For example, I'm specifying the Kate and the color and then I call the three methods the two methods. If you remember, they were originally created in based class. That is a start and stop. So I call them for my new class, the car class and since it is inheriting from the vehicle class, that's okay. I can use these methods for my car plus as well. Moreover, I'm calling the new method I created for my car class that is in display. It without seatbelts. Okay, lets around this example and see the output. So you can see that the call to their three methods was successful. So you can see that the vehicle started to be a good start as well as the total seatbelts Number is five. Okay, now we can proceed to the next lecture. 9. Loops: loops is another important principle in computer programming. Let's try and define or the movies. So what is her live in partner? Me. A loop is a repetitive process that ends only when certain conditions are met. In different case, the load continues, and we need to be careful when we specify the conditions for the loop to stop in order to avoid creating infinite loops. So now, about the types of loops, their typical types of loops and tool and they are therefore loops in the wild loops off course. In many programming languages, you can find variations of these main loop types. For example, you can find do while loops you confined go to with the labels and other types off loops. However, the main types are for loops. And while oops, now let's see in diagram explaining how a loop works. So our program starts execution, and then it reaches to the execution part off the loop. Now, as soon as the loop starts, it also starts checking its condition. Now, if this condition is true, it runs in process and calculated into the loop cold look. Otherwise, the conditions false, the execution stops. Let's see some examples where Luke is required when creating a computer program. One example is when you want to read one by one all the condoms off Honore and for forms of connection. Another example is while it given file, has lines, read each line and perform actions and based on each line, the cure it. Another example is, let's say you want to pre numbers from 1 to 10 and finally, another example is when you want to validate user input, Anti is correct. For example, your program takes user input and expects a number. And while the user gives something else will. Still, for the number the loop keeps on requesting, the user can tell the proper input. We can see here two examples in C sharp so conceded has example, is the for loop example. It counts from 1 to 10. You can see it uses the for keyword, and here it says the counter is an integer. It starts from zero and reaches upto the number nine. That is less than 10 and each time the loop is executing, these counter is increased by one. Now, this is the cold block off loop, so each time loop is executed it prints on the screen the value off counter I similarly using a while loop we do the same. So we specify. Ah counter that's J in teacher. It starts from zero and you can see here using the wild keywords and the condition. J Lesson 10 There's actually reach upto number nine trained each time the value off the counter on the screen and also increase the counter by one each time. Now, for these two loops while the condition is true, there loops would be executed the first time the condition would be false. Then the loops will tell me their execution and control will be given to the rest of the programs. Logic Okay, lets see these two examples live using and them on see shop. So this is our Lupin demo You can see just like we saw earlier in the lecture here. I'm specifying a for loop in the while loop. Each of these loops counts from zero cool nine here I'm saying come from 1 to 10 about the scenes. The counter starts from zero. It comes from 0 to 9. But we can change this rope. Let's start from one and the condition is I less or equal to 10. And let's do the same on the while loop. So J starts from one, and the condition is J to be less or equal to 10. Okay, let's compile. Let's repeat our solution. So we rebuilt our solution and we're ready to Mexico. So let's click on Start and we can see the form of example counting from 1 to 10. I can see here it was successful executors. Now let's around the while loop and you can see again that it comes from under 10 as well. Okay, that was a very, very basic example. Off loops, you can do many things with loops. You can virtually at any logic within the court block within the loop. So that was just a simple example showcasing these two different types of loops. Okay, now we're ready to proceed to the next lecture 10. Branch Logic: when we create computer programs, we somehow tried toe mimic the human behavior for example, a program based on user input. It will act differently if it has input a and differently. If it has, it would be. For example, if a program expects they use their TRANTER on a teacher s user input and enters a character, then it will give an error and request they use their 20 the proper input. If the inputs correct, then the program we continue its execution. This is a very basic example. So how do we achieve this behavior in computer programs? The way to do that is by using branch logic. So in this lecture, we're going to talk about Branch Logic, Welty's and how We Can Implement it. So what is Branch Lodging in programming? Branch Logic, also known as branching, initiates different instruction sequences within a program based on a pre defying logic and specific conditions. It's just like the example I mentioned earlier in the beginning of the lecture. So in most programming languages and branching supplemental using the if else keywords or variations of these, for example, give lcf else. Besides, if else there is this reach key weather can be good for branching and inside programming languages. You can also use labels with go to command. And so what? But the most typical branch logic Plantation is by using the Eve s keywords. Okay, lets see a diagram showcasing how branch large works. So we have a flow off our program and reaches a condition that is anything else. So if these conditions false, then the respective called block is executed. Either condition is true. Then again, the respective called Blow he's executed. This is a very simple example off. If else, you can also use the else if key words if you like, you can further break these branch logic. Okay, this is another example we use C sharp called toe display in Brantley Logic Example. So I have two variables here, double by apples and have the initial price and then discounting price that this kind of place is initialized using the initial place. And this is my programs logic. So if the initial price is greater than 100 then in these court block, I'm displaying these message and I apply it a 15% discount on the initial price. And I said this value as the This complies then on display on the screen, the initial price and then discovered price. Now, if this condition is not met, so that means that my initial place is less or equal to 100. Then let's play the message. Not eligible for discount is a simple example. Off branch logic in C sharp using the if else keywords. Okay, let's jump to readjust to deal and see this example life using in demo. So I'm back in our development environment. This is a quote I showed earlier in the lecture so you can see the initial price and this can place. You can see the condition from this count that the initial price must be greater than 100. And in a different case, I just display the message not eligible for discount. So let's around this example and seems initials. Prize is greater than one handed. The first court block is executed and that this come is applied. Now if we change the value to something and below 100 so let's make these 93.15 and around the program again, the second call blow would be executed because that means that the initial phase is less than 100. So this gun can not be applied. And you see the message here not eligible for this count. You can do much more losing branch logic not only in SEASIA, but in many computer programming languages, and that you can create some really complex logic using punching. Okay, let's proceed to the next lecture. 11. Exception Handling: when you develop computer programs to tell your best who do a thorough testing, the bagging quality assurance and all actions that ensure that you are software East back free. However, you cannot always predict the environment into which your program is being executed. For example, environment might have limited resources or the user input, the correct and many other cases. That's why exception handling comes to the rescue. And that's why exceptional huddling is a must and also a very important program in principle. Exception handling. You can handle these situations and thus allow your application to continue its float. Let's talk about it. Exception Handling is a mechanism for 100 unexpected around time errors during the execution off a computer program. The main advantages that you can still control the normal flow the program, even in the unexpected event off a runtime error. Also, another important point is that in most programming languages, there are many types of exception for more galangal exception huddling. Now let's see the main constructs used for exception handling In most programming languages . These constructs are the Thai cars and finally keywords. So each one of these keywords has its wrong code block that is executed under certain conditions. Let's see on an exception 100 flow. So that is a process in the type block. Even exception is raised, then exception 100. Love is the court block in the Koch keyword takes place and either displaces a message to the user or takes any other actions in order, not toe Have the computer program cash Now. Even exception is not raised. A lot of these the false here to the top tourist condition, then program continues execution. Also, if you want to make use of the final code block whatever you include in the final call, Block is always accepted. Now let's see an example using some C sharp cold so you can see I have two methods here. I have a method that uses exception handling in another one that does not. The 1st 1 you can see that I have the try and catch key was so my tie called Block actually surprised food parse string and convicted toe a number by the string. Besides, an Embedded also has a character, so eventually these will give an exception. So what I'm doing in the catch exception cold logs that I'm displaying a message. I'm a for displaying the exception error message to the user. Now it would take a look at the second method. Price is no exception. Country is that I'm trying to do the same passing. So I'm trying to convey the same string toe and its future. But I'm not handling any possible exceptions Now. Eighties off used that the correct call in this example is the 1st 1 that is the process exception handling method because this has full control of the programs execution, even in the unlikely event off having a run time error. Let's see this example are using a live demonstration in C sharp. So I'm back in our development environment for C sharp. We can see the example off exception handling. So here you can see the first method that this process exception handling where I'm trying toe do the conversion offspring 20 jher and I'm using that. I catch keywords showing my try quote block. It's the convention itself. In the catch cold block. I have two commands. The festering displaced, the exception message user, and then it continues program execution. So I'm showcasing these by displaying a message that apart from execution continues. Now the second methods that again I'm trying toe convert the string to number, but I'm not doing any exception 100 I'm trying toe continue program execution. But let's see what happens And during that time. So first, let's run the method that use this exception handy. So let's repeat our solution and let's call these methods. Okay, let's kick start. You can see that this is the exception. Message in posting was not incorrect for months. That's because in my staying, including a character. So these stink. Of course it is. Our view is that it kind of be converted toe on a teacher. But you see here that after displaying their message program executed, continues and within my touch code block, I can perform any other corrective actions I like. So this is a proper way off controlling the flow off the program. Even they ran off a runtime error. Now let's around the single method that has not used exception handling, so let's repeat our solution and click start in order to see what happens. You can see that the application terminated the message programs if you continue to was not displayed because the court did not reach that part of the applications logic. And I get a narrow minded urban environment that, on a handle exception off types, Eastern formal exception or cash. So you can see this is an unpredictable behavior of the program because it encounters around time letter, and he did not know what to do. So with this simple example, I hope that I managed to show that it is very important to use public, exceptional, kindly, mechanistic when writing control programs. 12. C#: in this lecture, we're going to talk about the social programming language. What to see Shop C Sharp is in general purpose programming language created by Microsoft. It is object oriented and transindo tonight, firmware or not, framework or the main free seas have development. Environments are on windows. Usually he's visual studio. Know that that is the community edition, which is free under certain types of use. And you also need on the Internet from were ordered not from our core on Lincoln Mark. Always you can use a file editor for editing the party files or some cross platform I These as well as Dr Core. Not that not have core is the cross platform Russian off not enough framework. And that means that it can run not only on windows but also only nooks and Marco West. Now let's talk about the basic C sharp cold constructs. First, let's talk about data structures. One of the main data structures in C Sharp is array. In this example, you can see that I'm specifying Honore off integers, and I'm showing how with a for loop, how I can access each element of the array and said the value Similarly, I show how I can create an array of stinks and the same way like above. I can set a value for each element. I know that you can create a race for any other type in C Sharp, for example, Besides integer and strings, you can create an array of doubles float, and so one. The next test, Actually I would like to introduce in C. Sharp is they raced this and raise example where I'm creating arrays object and then with the ad method I our values. I know that the difference from a raise in a realist, you don't need to specify the number of elements it will go back to the previous example. You can see that for each other. AI specified the length, so here I specify that generate off 10 integers. Same stands for the area of strings where I specified that vision array off 10 strings. However, in their A list, I don't need to specify the legs. These gives us the freedom to art values twat elements to our A list whenever we need, without having to specify upfront the length off their east. Another distraction C sharp is least here and it to specify the data type. So this is a list of strings, for example, and similarly like their A list I can at Vegas whenever I like. Without the needs toe specify the length of Fareast upfront Listen that released belonged to collections. So that's why, besides the initial declaration there way off adding and removing like this is the same. Now let's talk about the link least the link listed specified with these syntax. So here I'm specifying that I want a linked list off strings and the difference with least and the frailest is that in the linguist, you don't just at elements you can at first at last, and so one other than instructions in C shop are dictionary cash, table hash, said Stock and COO. No less terrible functions. In these examples, I specify two functions. The first function is a function that returns a new teacher, and it takes two parameters into a into B. So what included in these sample function is that I'm returning a new teacher, which is the result off the addition off A and B. There's a similar example with the second factor here were considered, I specified function that it tells a streak. So it Texas parameters. Two strings and be and it's concussions the vitals of these two strings, and it hurts the result. So whenever dysfunctions called, the first function taking is part of 20 years. He did tells the addition of the two and the 2nd 1 whenever called Incan carbonated, two strings past as parameters. Now these are two loop examples in C. Sharp In the festival example. I'm using the for keyword so you can see here that with the for keyword, I'm performing 10 repetitions. So the coal inside the cold look for my four. Statement is executed 10 times, and each time it is placed on screen, thereby you off the counter. I'm performing similarly the same thing with a while loop so you can see here. I'm specifying the counter that is X. It cost 20 and using their wild keyword and having that as a condition extra be less than 10 each time. This call is executive. Now, this cold blue within the while, Loop displays on screen the number of the counter each time as well as it increases the counter by one. Now let's see some branches, lodging C sharp. This is an example using the if else statements. So what does this coat? I'm specifying any Fisher and said initial by your zero. So with if Ellis I can check the value of these number and the condition is this number to be less than zero and give these conditions satisfied, their first called Block is executive. That is displeasure on screen, that this is a negative number in the opposite case where the condition is not satisfied, and that means that my valuable is not less than zero. Then the second court blocks executed by this bag on the screen that this is a positive number know that you can have variations off the if statement, meaning that besides, if else you can add in between the two else if statements another way off applying branch lodging, see shop is the use off this reach keywords. So this an example of using the reach keyword. So I'm specifying the Q outreach and in parentheses. I include the valuable to be checked in this case of a rebels integer so have different cases, and next to each case I'm checking specific value for these valuable. So if Mark check equals zero, this cold block would be executed. If it is one this court club, if it is to the other cold blob And if it is not any off the 1st 3 cases, then the default block. My switch statement would be executed. Now this is a cold construct for exception handling C sharp. So let's explain this example Off exception handling. See shop we think to tie code block I included this coat. As you can see these coat, it tries to create a connection on its quite connection and then around equity this query this elect version query against my connection This is actually a super sever connection. Now I'm open interconnection our Mexican, the query and display results on screen if there's no result displaying on screen that no data is found. However, if this cold blow within my tie statement, my track he worth is not raises an exception during runtime. Then I'm catching the exception by displaying on screen the the exact error off the exception. This is a simple example of exceptional Hundley. Okay, now let's present twin demo and see in action what we have, what we have discussed about C sharp cold constructs. So this is my visual studio development environment. And let's see some construct off we'll have discussed in the lecture. Okay, the physics sample scenario. Example. So here I'm specifying a Nari off interiors of size 10 and with a for loop I after it through each element and said its value in this example each elements value is the corresponding about you off the I in teacher. Similarly, A have specified another of strings. Again with 10 elements and again with the for loop, I specified a value for each element. Okay, lets at some court here to display the contents of the two tables. So again, with the for loop, we'll display the conduct of two tables. I will use a single form for these because the length is the same for the two tables. I will just have called here there a condition I to be less than 10. If the sizes were different, I would use the name of table daughter length in order to be more precise. So let's that comment here. Display are condoms and let's pass their parents is now, So it's numbers I end string side. And in the end, it is that a council there it lying in their or our application executioner who further proceed. Okay, let's repeat our solution. And let's check how these two arrays are used. So you see here I managed to display on screen the concert that Suarez. So in each lions play the results off position 0123 and so on. Forage 12 days so you can see that the festival Legace. Everyone is zero, then, all right, Who just history is Viagra zero, then everyone the second by us one and for all right through the second values value on and so one. So it's a simple example how I defined toe a race, an array of interest in an array of things. How I said right for their elements and how I accessed its values. And for this example, I displayed these values on screen. However, if you read more complex applications, you can access the language in our arrays and the further process these values in order to build more sophisticated application logic. Okay, let's put in comments this example and proceeded with another example with the array least least and link list. First, let's see their A list. As you can see here, I'm specifying A new are released. The name is Sam policed and with the at method Amounting values, for example, have added three Viju. Similarly, I have defined at least off strings the names listing sample where with the at matter as well, I have other three values now. The third example in this category is the league list. So here I'm specifying a linked list off strings. The name of the link list is linked to this example, and I have used two methods. That is the at first method, where I added the first are you and the at last method where I have added that as are you in my link east? Okay, so now let's display the contents of these collections of their at least off the least, and the link is so after the collision off each of these collections, I will be displaying their condoms on screen just to showcase how we can access their comments. So I have two options here. I can either use the for loop, which is what we saw earlier or better I can use before each concert. So with for each, I can tear through the elements off my collection and access them. So here I'm just using their name off my released and now with the item reference, I can access the elements of my released now. By the time we know that the elements off our are released our strings, we can change these two string as well, in order toe directly cast the results into stinks or so Let's at a neighbor here. Similarly, let's do the same for our least strings that this least example again, we cannot hear it through its contents. We can use forage for all collections, and since I released the least linked lists are collections in C sharp. We can use the same methodology for accessing their contents. What's left here is who I tell it through the contents off our biggest. Okay, so let's change the labour here. And let's use the linguist name in our iteration coat. Okay, let's stop execution of the program here instead to proceed to those of examples. Okay, so now we have specified our our A list least and Lingle is that we have added attempts values, and now, with the forage construct. We're going to iterate through their contents and display them a scream. Let's around our demo. So let's built and let's click on Start and yes, here you can see welcome. So we have successfully access that the contents off our released, then the contents off our list and last but not least, the condoms off our link list. Excellent. Now let's proceed to the rest of the examples. So this is a loop example. But since we have used loops in our earlier examples, for example, or to a race when we began this demo, there's no need to see another example off loops. It's pretty straightforward, these called constant. So let's pull these in commenters well and proceed toe the second way off using a loop in C sharp. That is the wild statement. So here, let's see this coat so have specified and a teacher that is X equals zero. And then I specified while and then the condition that these X to be less than 10. So that means that starting from zero reaching up to nine, I will have 10 iterations within my wife code book. So this cold concentrated line X string around 10 times and each time after, and the commander or set of comments, My while called Block, I need to increase by one the counter that is, in this case, the X integer. So let's double execution after we're in this example. So create lying and return again in order for our program toe. Just stop here. So let's beat and around our program and you'll see that my wife loop successful, ran and displayed 10 Vegas that is, from zero tonight. Okay, The next example is branch logic. So the first way off having branch logic in C sharp is using them if else or if else if and then l statements this example, I will just use if else, for the purpose off simplicity. So, as you can see here specified in Indonesia, I said initial value off one and then I have my if else statement here. So the conditioning. My if statements this interior of our chek to be less than zero if it's less that zero, I display this message on screen that is, the number is a negative number. If their condition is not true, then the else court look takes place and this place on screen that then I'm very supposedly number. So let's rebuilt our solution. They ran it and check the outcome. You can see that It says it is a positive number because the virus one So the first condition is not satisfied because one is not less than Syria. So the cold block in the else statement is executed and I get on screen that one is a pretty number. Another way off having branch lodging C sharp as we discuss them. Elections Well, is this which keywords? So let's see another example here. Blatche Lodging using reach. So again, let's use their vile check in Teacher, leave its value to one. And here is our switch coat. You can see that after this reach que what is used? I'm instructing the program that teaches about the var check integer variable. So here I have some cases have where the cases here that means whenever vulture equals 20 this quote is excited here. So if a number zero there and display this message, if the number is one on display, these message, if it is true, then these message and if none of the three cases is true, Then the coding and different cold block takes place, and the displays was carrying that values. Not one neither to neither thing. Okay, let's rebuilt our solution and ran that program. And by the time the number is one, then the second case that this case one would be accepted and should display of skills. That value is one. So, yes, you can see that our branch logic worked probably. And this place on screen that the tiger of interesting number he's one. Now let's talk about exception handling and see an example off connecting our program to see what server, for example. So again, let's put in comments of the previous coat and let's proceed to our exceptional 100 example . So here you can see that we think I, I have called that connects to a sequel server arounds acquitted of this select version just in global variable civil server, and eventually it will hurt innovation off my civil servant. Instance, I'm connecting toe and you will display or screen these information. Now, if there is something wrong. Connecting to the world's ever, for example, are used misters name that does not exist or specified, and there's always that does not exist or any other issue that pier on Ramtane. Then that catch, called Block, will take place and display the problem. Exception mess age on screen. Okay, let's repeat our code and let's connect with you whatsoever. And, as you can see that our application successful connected to the Civil. Several instances have specified a sewer seven with 17 develop tradition, and I get the information I requested, a successful displayed on my screen. Now let's cause an exception. So here I will use a source evidence that name that does not exist. For example, put here a then rebuilt and try to execute a program again. So now we should be getting an exception. And since I'm catching exception, I will just display exception message on screen without driving on a candle exception. My application. So let's wait a bit because you specify a source, have any sense that does not exceed, for instance, that you don't have network access treat. It takes a few moments in order to get their message. So yeah, here you can see the exception that is well known. A network related or Easter specific are kept. Why establish a connection. She was server. That means, as discussed earlier, that there she was seven instance is not reachable or does not even exist battle with these private exception friendly mechanism, I managed to catch this exception and candlelit instead off allowing my application tohave an abnormal behavior. Okay, the last examples are functions or is better known. Object oriented programming methods have two methods. Here is simple function and see perfection to So let's put in comments the exception country example. And now let's just call these two functions and see how easy it is to the use cold using methods in seizure. OK, so I'm just I need toe after the static. He worked here because I'm calling these functions for my static main faction. So Okay, so I'm calling simple function. I posit parameter one and two. So I'm displaying on screen the output off the function court And since I get the number and type of display this string, I also need to use their too strict method here. Similarly, I will also call simple function to where it can continents to stings and so will pass within the parameters here string one string to and also display these on screen. OK, let's a build and then let's try our method calls so you can see that the festival disturbing because our marching numbers one and two via the method and their output off the second method call that is a concatenation of strings string. One of string to is what I get from screen, and it is correct. Okay, That was a simple set off examples off many of the basic code constructs in C. Sharp examples were pretty simple, but starting with a simple usage of these called constructs, you can build more sophisticated application logic and ah, result of complex problems. Okay, great. And now, well, let's proceed to the next lecture. 13. Java: No, let's briefly introduce the Java programming language. So what is Java? Java is a general purpose programming language orginally created by Sam Microsystems, which was later acquired by Oracle. It is on object oriented programming language, and its main concept is two right ones around anywhere, meaning that job by itself. It was this Java bite quote, which the javelin time engine is cross platform in Conran on any operating system. So the idea here is that you arrive your Java code and it compelled Chuan's and then just around on any platform, without needing to compile. Now let's talk about the main free job development environments. Some of them are not beans, Eclipse, 100 studio and more. That 100 studio is used mainly for more by ABS development in Java. Now let's see the basic Java code constructs and let's start with data structures. The offense death, Actually, we're going to examine. Is there a similarly like C sharp? You can specify arrays using tether types, for example, here I'm specifying Honore off strings in Java and um, initializing. These are A with three elements at least the value car, motorbike and train, then with a for loop I heard through the elements of these array and I display onscreen. It's fighters. Then there is the erased, specifically their alias using the cure our A list, and you also need to specify the type. So in this case, I'm creating on a raised off strings and with the at method amounting elements here at about the three elements that is a car, motorbike and trey. Then with a command system out playing the line and the passengers private er, the name of the are released, its contents are displayed on screen. Then there is the link least in order. Specify linguist. In Java, you need to declare a linguist object using the linked list. Keyword along specified again the Did it help for the linked list? So here I'm declaring a linguist off strings on emptied very a course list, too. And I have added again three elements that his car, motorbike and tape, then similarly like in the case for released by including the name off the link list on the front line command, I'm displaying the Viagra Sevele increased on the screen. Some other dude structures in Java include Stark a Q three hash mark Dream up. Three set and more. Now let's talk about functions in Java. These are two examples of functions. The first example of tears. Any teacher. It's called sample function. It takes his perimeter to other integers A and B and returns the result of the addition of these two numbers. The second function Retention string. It's called some production again, and it takes as parameter to stings where it returns there. Contamination result off these two strings. No about loops in Java loops can be achieved the using either the four statement or the wild statement. So the first example I'm using for I'm specifying my encounter, which starts from zero. The condition for the loop repetition is I Toby Ness than 10 and each time it is increased by one. So eventually these called within the Forecourt Club will be executed 10 times and which time it will be displaying the vital off the I in teacher on the screen similarly, with a while loop specifying in teacher outside the loop. It starts from zero, and with the wild keyword and the condition I to be less than 10 they're below called is being executed 10 times, so each Times executive again, it prints on screen. Their value off the I variable ended also increases the counter by one now about branch lodging in Java. Similarly, like other programming languages, you can use the if else statement as well as the else if if you like you not a tool, have more conditions that basic if there's conditions. So here, for example, have function that Texas parameters to in teachers A and B, and it checks. If a is greater than B, then it displays on screen. That is greater than being in a different case where a equals B displace their 11 message on screen. And in their case, where the above two conditions are not met, then the else court look takes place and its displacement screen that b is greater than a also, you can have branch lodging in Java using this reach. He worked so here the example I have function where it was this the speech statement. So the function Texas parameter any teacher that is variable called Hey and the street is applied for these valuable. So I have two cases and then default code block the first cases where a equals one where I play in their level. Message on screen. The second cases where my a integer variable equals two. You. This is the case here. I just display of screen A equals two, and this is the core block for my perspective case. If none of the two cases is true, then my coat executes the different come pluck that is this run which displacement screen A does not equal to one or two. Last but not least, let's talk about Exception 100 Java, which seemed lovely. Like other programming languages it uses, try and catch. So within the Tri Corp block, I'm writing my coat, which I want toe full control. So if there's around time error executing the cold block off my tristate men, then catch cold block takes place. So in this case, I have a runtime error executing these two statements. Then the catch quote blow will display the error message on screen. Okay, great. Now let's write a simple Java program that showcases what we have talked about in these lecture. So this is my development environment for Java. I have actual downloaded. The latest Gervais Decay also downloaded a parching. That means I D the latest version. So after installing Java and installing a passionate means and apply some path settings ableto compiled and the Ram Java within a patching that beans, I plan in future additions to this course with the Special Topics section to include clear instructions and show step by step, how you can easily set up each and development environment for many programming languages. Not only the programming languages I'm talking about in this course, but for more programming languages as well. Okay, now let's see some of the court constructs earlier discussed. So I have created a new job application. This is the source package, trav Application one and this is mine. Java coat. So let's explain this code. Compile it and running it in order to see what we get s output for different code constructs show defense example have specified a string array disarray Example where I entered as I use car, motorbike and train they're using for loop, I display on screen each value of their A. Okay, let's put in comments the rest of the cold. So now, right after I compile and ran on Lee, these portion of coal will be executed. That is our ray. Okay, let's compile. So my source has now been compiled. You can see that Bill. It was successful and let's execute. So this is the output helpful window so you can see that just the wind, my application around. I get the output off the array that is car motorbike entry. Okay, let's proceed to the next example where I'm using an array list. So let's put in Commons affairs example and let's proceed to the other one. So here I'm specifying on a released off stings. And again with the atom effort, I'm adding a three bikers at his car, motorbike and train. So let's comply and you can see that again Built was successful. So the next step now right after compiling this code is to execute it. So we kick on execute and here you can see that this is output off my program that is displaying the values for the Maya rarely studies car, mother, bike and train. So let President now, with a linked least example. So let's put comments there released on uncommon example, the league least so here I defined a linked list off stings and I named it vehicles east to end. As you can see here by calling for the 1st 2 elements, they are method. I have other car and motorbike and by calling the at the last method I have added as the last element off my link list attained by you again with system out in the land and passing this parameter the name of my linked list I'm displaying on screen the contents of the linked list. So let's compile again. You can see that the bid was successful and now let's execute and you see these his Val could. It's exactly the same, like a very least, so you can see that the contents of my linked east, our car, motorbike and trade. Now let's proceed with a loop example, using the for loop, even though you used it for their, for example, with a raise. But that's okay, let's use it again and just display offscreen 10 numbers. So here are my telling 10 times, and each time I'm displaying onscreen divide who off the counter. It starts from zero and goes to nine. That is the last value, which is less than 10. But since I want to come from 1 to 10. Let's change it a bit. Show. Let's start from one and let's change the condition, Toby A less or equal to 10 and each time pinning a screen. Okay, let's compile again. We can see compilation was successful, and now let's right. So now you can see that my application was successfully executive and I displayed on screen 10 numbers. So I started from one and finished with 10. Okay, let's run another loop using the wild statement this time. So here I'm specifying Anita Chair and I'm initializing the vibe zero. This is my counter, and the condition is while I is less than 10. Print the value on screen and increase the counter by one. Is time have let's change this as well and start from one instead of zero. So and it also changed her condition and youth less where you call to 10 and let's compile . Okay, compile Asian was successful. So now let's execute our program and check the output, and you can see in the output window that the program again displayed on screen numbers from 1 to 10. Okay, now let's see some functions in these job application where quick you know I have created some sample functions in Java. So now let's use the first function, which is simple function, returns and string, and it takes its parameter two strings, which then concoction ate their values and returns the result. So let's put in comments the previous example. The while loop And now let's see how we can use the sample function. Let's create a string. Let's name it while and divide you for thes string would be the result off the call off sample function show. I'm passing his parameter value on and by you too. Okay, then the next step is to display on screen their value off the vile variable note. At this point, that seems my main method. These static, just like in C sharp examples the methods created here. The function script here need to be studied as well. Otherwise, if they're not study, you'll need to understand she ate them class and call them via the class object. Since I want to keep this simple, are just other the static keyword my functions and so I can call them directly from the main method. Okay, so this is the call to the function and we're signed its result toe their valuable ValuJet's string and then we print these on screen. Let's compile. Compile a Shin was successful and now let's execute the coat so you can see that the street concatenation result off vibrant. But two is this one. So right now we're successful called function sample function and displayed there is out off the call on screen. OK, now let's use the second function that these there branch a logic one function which via these function, these method we apply in branch logic. At this point, I would like to mention that in object oriented programming languages, if you want to be more precise, actually you you call function says methods, however, for purpose off simplicity, I call their names interchangeably, so I can either call them functions or methods. So in these contexts is the same thing. Okay, I have their method bra geological one which Texas productor between teachers A and B and then I apply in branch logic with using the if else if and they'll statements. So the first condition off my if statement is if a is greater than be I spare screen there working that is greater than me. In the different case, where a equals B, I'd spare screen the message A is equal to be so a because B and in any other case, my else statement takes over and this place on screen that B is greater than a So let's call this effort it's avoid. It does not return anything just displaced on screen, so I will just call it without using a variable assignment or anything else. So we just called there Branch Logic one passion, and we pass it parameter one and two. Let's say we comply. Our coat compile a shin was successful, and we execute. So now would get the message that B is greater than a because the second number passes parameter is indeed in greater than fest one. So my branch logic worked and displayed the correct message that this be is greater than a Now. Let's use the second branch logic method that he slash allergic to it takes is a parameter one in teacher and I'm using a switch statement. Basement, which have two cases in the default, won the first case. He's if a cost one that is a has that you want and this place the corresponding message on screen. Otherwise, if a equals to two, that's the second case. He displays the relevant message or screen. If neither cases are true, then the default hold block takes place and displacement screen that a does not equal to one or two. So let's again call these methods again. You can see that ditties avoid so it doesn't other turn anything back. It just displacement screen. So we call it and passes parameter. The number and we get there is out on screen. So we called Branch Logic to and let's passive parameter the number three. So let's compile again and then execute, and you can see that we get the message A does not equal to one or two. So our switch statement work assignments to work. Okay, let's proceed to the last example in these Java program, which is exceptional handling. So here you can see the Tie Koch statements so, you know, try code book. We specify history array with three values that's card, mother backs and train. And in case there is any runtime error we catch of exceptional and pre no screen their message again. This is avoid method So let's just call it without assigning any valuables. Okay, it's compiled. Compilation was successful, and now let's around the program and you can see that it displayed the memory address off. Very now. Let's change the coat in the Exception 100 Method and let's around a four loop and had on display the actual value of each element. But here I won't be using. It's the condition the length off their array. But instead I will use the number four show. My for Loop will run four times, so in the fourth run it will generate an exception because there is not 1/4 element in the vehicle array. So I will get an exception. And via the catch statement, I would be able to display the exceptional message on screen. So let's tight toe so that good let's comply, comply. Elation was successful because this is not compile. Ation issue sinned actively. My coat is correct, however logically is not correct because it had taxes 1/4 element in their vehicles array. But the scenes that is not I will get around him error, but that's okay because I will handle it using the try catch statement that is exceptional . 100. Let's call again the method and let's see help. You can see it displayed the three vibes with table, but the fourth execution off their code. Inside my for loop, I caught on error, and that error was touched by my Tai Kok statement So you can see error index three out of bounds for, like three. So this was a simple example of exception handling in Java. That was our simple Java program that was used for illustrating many of the concepts discussed in the lecture. Let's proceed to the next programming language. 14. Python: in this lecture, we're going to talk about the python programming language. What is Python Python is in general purpose programming language created by treat oven Rose . Um, it is on object oriented language. This is also high level now about the main free python developer. Environments can use eclipse visuals to the quote, the genie editor and more so the main idea for using Python's that you have python installed and then you have to install their I. D. That best suits your needs enough for developing tyshon scrapes and cold. Now, about the basic python quote constructs. We started death structures and let's see the least. So this is a list example, and this is how you define. At least you just enter a name for the least, and you can initialize the least with the vitals. Within. Brackets like this example, I'm building a vehicles leased and I'm initializing it using car, motorbike and train. Now you can print the least using these two ways for example, print vehicle lease and prince entire least screen. And by referencing a position often element, you just access this example. You print the value off that element. Doubles is also another to the structure in Titan. This is a terrible example. The way for defining trouble is similar to at least, but in this case you use parentheses enough between initialize the vipers for the topple. Other distractions include from dictionaries, sets and other. Now let's see an example off a function in Python. So this is how you define it. Function used the Cure Dev than the function name and in this example, defining as a simple function that takes no parameters and just displays on screen. Hello from sample function. So they were way off. Calling this function is just again, like in all the other programming languages we discuss about by referencing the functions. Name no, about loops. There are two ways off having loop functionality your python code. The first is by using the four statement. So consider this example. Where have, at least with three elements that this car motorbike untrained and with the for keyword, I attacked through the elements of this least and print them on screen. Another example is a usage of the wild loop. So here I'm specifying and number that starts from zero that I used a while keyword and within parentheses. I said that the condition for a petition off my wild loop. So while I is less than 10 the local would be repeatedly executive in this case. Each time I'm feeling on screen the value of I as well s I'm increasing the value if I buy one. If you don't know that, I mean in a while. Loop from generally Nene program language. You don't increase the value a counter. Then what you get is an infinite loop. There is a will be have application that never ends execution. Okay, now about branch logic and python. We'll see an example off if l if and else so this away off having branch A logical python. So I have two numbers here A and B A has a value 100 B 200. So have fun if a leaf an else statement their condition for my if statement is. If a is greater than be display on screens at a is greater than B, then I have another condition that if a equals b using the relief keywords to print a screen that A and B are equal Now. The case None of the bath to conditions troop, then there. Scott Bloch is executive that is displaying a screen that B is greater than a exception. Handling is also possible in python and very useful, and you should always use Exception 100 in your programs like I repeatedly command throughout this course. So this is how you can have exception. 100 python. Use the try and accept Cute. So we've seen the try called Block. You have your coat, and if something's wrong during around time, then they accept Cold Block is executed. In this example, I'm just displaying that vault number was given a secretary. Okay, great. It's time to write some code in python and see many of these code constructs earlier discussed in these lecture. Let's proceed. So this is my development environment for Python. I'm using the Gini editor, and I have installed Python and said the proper paths. So I'm ableto compiling execute Python scripts within Jeannie. So let's proceed with a cold, and they see how kind of Final East, similarly like displayed in the lectures. This is an example feast. So I'm defending the name of the least, and I'm initializing using Viagra's within brackets. So here for this lease for the vehicles leased. I'm specifying Car, motorbike and train as the values of the elements least and with a print command. I display all corners of screen and with the plain common again. But this time using on index off an element position within the least, I display just the value for that specific element. So let's compile and execute. You can see the first print displacement screen all values within the least in the 2nd 1 displaced the value of the element in position zero. That is the first position in my least that is the car value. Okay, let's pull in. Comments the least example, and it's pretty toe example with functions. So here I'm defining a function called Sample Function does not taking parameters, and the only thing that does is displaced onscreen. Hello from the sample function. So let's call this function using its name. So let's put on exit here, not for a cordon. Proceed further with the other examples. Let's compile, You see, compile Asian was a success food, and now let's execute and you can see that the functional was probably defined and called, and that's why would get on screen the message when calling this function. That is hello from the sample function. Okay, great. Now let's see the two ways off having a loop in Python. But first, let's put in comments the cleavers cold. Okay, so the first way off having a loop isn't with a fork. He works. So having the least here called via costless to has three elements That's caramel by train . And with the four key word where I tear through this least values and we between them off screen now, another way of having a loop in python misusing their wild command. So here have any theories that is set to zero This I and the condition for our while. Command here is executed while I is less than 10. And each time what it does is to display screen the value off. I last trans least within the wild coat look to increase each time they've I go off I in order to avoid having on infinite loop. Okay, let's run these two loops. So let's comply and execute our application. Okay, so you see that the first loop returned car, motorbike in train that is values in our least called Vickery's, too, and the second example of is the wild code. Block returns numbers zero until the nine that these Vegas off the counter since its start from zero and the condition was to be less than 10. And in that case, nine is the largest possible number to reach, which is less than 10. Okay, so now let's proceed to branch logic examples. So let's see on if Elif Else example. So have two numbers here. A and B A cost 100 B 200 and the condition for our if statement that if a East Britain will be displayed at 11 Message on screen now in kids, where a equals B display on screen that arian very quick. Now, if neither of the two above conditions is true, then there's code Block is executed that is, printing on screen that B is greater than a Now let's comply this cold and execute. Check its output and we should get that B is greater than a So you see. Indeed, we get the message that B is great for than a. This is correct based on their logic, we included in our python application. So the next example to see in this them are, is exceptional hungry. So let's see these sample code here. So have a try and accept called blocks in my track or block. I'm just getting is an import from user number. I expect to get any teacher. And if there is a Viagra error that is, get an exception acting wrong value entered by the user, then the court block within except is accepted it that is, in this example, displaying that involved Number was entered. Okay, let's compile in run. So we get here, please enter number. We enter the number age, and we get a message that I'm very state. So this waas correct program execution. There was no around time error because I said, Who's that? I have entered? Indeed a number. Now let's turn again and instead off entering a number there and tear a string, for example, right? A These shoot journal. An exception. You can see that that was vibe. Wear off what expected user input because instead off entering a number, I have entered a letter string and my exception country. McCann is most figured, and that's why it displayed on screen that on the vault number was in terrible user. Okay, The last example is the chapel example. So let's see how we define and use a tabal in python. This is how well defined trouble. It is quite similar, like in the case off at least. But the only difference here that I'm including their initialization piroozi in Peru offices and not brag. It's so let's around this coat seem, you see that I have initialized topple with three elements. And then I displayed on screen the number of elements within this travel by using the land faction and housing is a parameter that terrible name. Okay, that was the last example in this set off demos for the Python programming language. Let's proceed to the next election. 15. Your Next Programming Language: Now let's talk about your next programming language. What is your next challenge towards learning a new program language and thus be ableto solve complex problems using these in new programming language? Well, learning our next program language would be much easier if you consider programming is a way of thinking and minds it. So you can consider that programming languages are just the tools for applying these mindset. And if you have the problem programmer's mindset, then everything would be easier. So give to possess the right mindset. That is the combination off technical skis, emotional intelligence, people skills and the witness who explore the world of programming. Then it will be much easier for you to learn a new programming language, especially when we're talking about general purpose programming languages. However, the stands also in the case off specific domain programming languages, since it might be a little bit harder living in noon domain specific program language. But again, if you have the right mindset again, it would be much easier in comparison person that learns these programming languages empirical. So here's a real life example for you. Before creating this class, I did not know Python, however, I knew the program of fundamentals and principles, and I also knew many other general purpose programming languages, for example, and you see sharp, C C plus plus and java and so on. So with this mindset, it was easy for me to learn python, of course, up to a point that worship acquired for probably designing and creating this course. So this is my message to you to see your next programming language. It's a challenge, and if you have the right mindset about the which I'm sure that you have it, then everything will be much easier.