----BEGIN CLASS---- [13:27] #startclass [13:27] Roll Call [13:27] kumar vipin yadav [13:27] Jason Braganza [13:27] Yurii Pylypchuk [13:27] Mayank gpta [13:27] Abhishek Singh [13:27] Gaurav Sitlani [13:27] Saikat Dey [13:27] Bhavin Gandhi [13:27] Robin Schubert [13:27] Sandesh Patel [13:27] Akshay Gaikwad [13:27] Samridhi Agarwal [13:27] Krishnanand Rai [13:28] Deepika Upadhyay [13:28] pooja kumari singh [13:28] Priyansh Sourav [13:28] Shivam Singhal [13:28] kshithij iyer [13:28] Apoorv Goel [13:29] Ravindra Lakal [13:29] Atul Krishna [13:29] Vivek Anand [13:29] Soumam Banerjee [13:29] Priyanka Sharma [13:30] Abhinav Shirur [13:30] neha kandpal [13:30] Balaji [13:30] Onyinye Madubuko [13:31] Before we start today, I want to ask a few questions. [13:31] Mahendra Yadav [13:31] If anyone here is new to programming in general? Say me. [13:31] me [13:31] me [13:31] me [13:32] me [13:32] me [13:32] Okay [13:33] We will start looking into programming language Python, and later we will see how can use that to solve issues in our life. [13:33] But, we will go slow. [13:33] And as usual, remember to ask questions. [13:34] If you don't ask questions, we will not be able to answer you. [13:34] understood [13:34] me [13:34] I am going to skip many technical terms, which you will learn slowly. [13:34] Roll Call: Tosin Animashaun [13:35] Roll Call: Suraj Ghimire [13:35] Python has two major revisions of the language, Python2 and Python3 [13:36] Roll call: Ashwani Kumar Gupta [13:36] For our training, we will use Python3 [13:36] Python is an interpreted language, the codebase which implements the python interpreter (which you all have in your computer) is known as CPython. [13:37] There are other Python implementations, like Pypy, Jython. [13:38] 2020 is the when the upstream CPython developers will stop supporting Python2 version, means everyone should start porting their Python2 applications to Python3, or they should start any new project in Python3 only. [13:38] https://en.wikipedia.org/wiki/Interpreted_language [13:38] https://en.wikipedia.org/wiki/Compiled_language [13:38] Two links to read [13:39] For later :) [13:39] ! [13:39] next [13:39] Why two versions of python ? [13:40] What is the reason behind that i mean to ask? [13:40] gauravsitlani, exactly same reason you can see cars made in 2001, 2015 or even in 2017. [13:40] gauravsitlani, A company makes a car, release it to the market, and then after a few years releases a new version. [13:41] gauravsitlani, Now, for Python3, it has many changes which will break Python2 code, that is why it started a fresh. [13:41] ! [13:41] gauravsitlani, If you search, you will find many articles and videos on the subject. [13:41] next [13:41] what do you mean by interpreted language ? [13:42] ! [13:42] CHOCOS, I pasted links, read them later to figure that out. [13:42] next [13:42] +1 [13:42] What happen to the larger code bases they have in python 2? [13:43] ! [13:43] Is they have to start from Scratch or it can be reused? [13:44] balaji, they will have to port the code. [13:44] balaji, they can still use the old code, but there will be no more security updates etc. [13:44] next [13:44] now they have started changing the syntax upto a few extent. But was it necesarry to make changes in the basics. I mean adding new features is fine but changing the basics will confuse others right? [13:45] soumam007_, The basics did not change much :) [13:45] soumam007_, also people sometimes accept changes, sometimes they don't. [13:45] Now, everyone open terminal [13:45] type python3 [13:45] :) ok [13:45] press enter [13:46] Roll call: Anu kumari Gupta [13:46] ! [13:46] You should be in a prompt >>> [13:46] yes [13:46] That is the python interpreter prompt, [13:46] type [13:46] print("Hello World") [13:46] press enter [13:47] print is a function which is printing the text (we call them string) which is defined by double quotes. [13:47] I mean inside of double quotes. [13:48] Now, change the text to your name, it should show your name. [13:48] yes! [13:48] yes:) [13:48] yes [13:49] :) [13:50] Now, one super big thing, spaces. [13:50] Press up arrow, and give a space before print, and then press enter. [13:50] Someone paste the error here. [13:51] IndentationError [13:51] Correct [13:51] Remember this Error name. [13:51] This will be the most common error for most of you. [13:52] ! [13:52] Python will force you to learn to type cleaner code [13:52] To know about indentation in general, https://en.wikipedia.org/wiki/Indent_style [13:52] next [13:52] why it is mandatory to use parenthesis in python3 [13:53] championshuttler, Because of the syntax? [13:53] where? [13:53] earlier in python2.7 it was not [13:53] championshuttler, You asked half of the question [13:53] kushal: for print command [13:55] championshuttle4, Few things. [13:55] championshuttler I think it is a syntax as we use in C. [13:55] championshuttler, Python is a programming language, print was never a command, but a syntax. [13:55] I mean statement. [13:55] Now print is a function. [13:55] championshuttler, Even in your python2, try print("Hello World") [13:56] next [13:56] kushal: I cannot use arrow keys up and down to browse the previous lines in normal python3 shell, neither ctrl+p. Is there another way other than use IPython? [13:56] kushal : ok :) [13:56] schubisu, Eh, I thought that is default, maybe I am wrong. [13:56] schubisu, I will pass a solution after the session. [13:56] kushal - it worked in my Fedora [13:57] kushal: yes, I'm running anaconda python3, okay, thanks [13:57] schubisu, Oh [13:57] it is working in mine, normal py3 [13:57] We will use http://pymbook.readthedocs.io/en/latest/ this book for our starting purpose. [13:58] brb [13:59] Try this on your interpreter: (This is just for newbies) [13:59] We can start writing code in the interpreter, but in a few hours, you will find that it is easier to write the code in .py file, and then execute that. [13:59] ! [14:00] Here using a proper editor helps. [14:00] ahole[m], try what? [14:00] Okay. kushal is back avoid the previous message. [14:00] Vim/Emacs are super good. [14:00] But, I know many people like IDE(s). [14:00] I would suggest either of two options. [14:01] You can download and use https://www.jetbrains.com/pycharm/ community edition [14:01] sorry kushal, but which two options? [14:01] i got disconnected:( [14:01] pr97_, Text editors or IDE [14:01] or https://code.visualstudio.com/ [14:01] okay thanks ashwanig :) [14:02] kushal, can't we simply use our terminal? [14:02] If you are low on RAM, https://code.visualstudio.com/ is easier. [14:03] RIcharD_, You can, if you want :) [14:03] No need to download these right now. [14:03] There is one more solution, which can help us to learn easily. [14:04] https://notebooks.azure.com/ but this will require a login to the microsoftonline, if you don't have one, you can make one. [14:04] RIcharD_: Terminal is only good for small code snippets. [14:04] The notebooks will on a 4GB ram based containers. [14:05] There are a lot of restrictions, but can be a good option for learning, as it will be easier to show us the erros. [14:05] * errors. [14:05] ahole[m], Not always, we use vim + terminal for all remote developments. [14:06] kushal: Remote developement of python code? [14:06] Rlchard_ , actually every line is interpreted at each and every line which we sometimes don't want and the other thing is we use text editors to store our programs [14:06] Now, I will wait for 5 minutes, if you want please go ahead and create an account in https://notebooks.azure.com/ or use your existing login [14:07] Or you can follow along using your local system. [14:07] PyCharm only supports python and web development, whereas visual studio code is an IDE for almost every language [14:07] kushal: I have 2GB ram [14:07] RIcharD_, wrong statement. [14:07] next [14:07] poojaencoded, Download code later. [14:08] RIcharD_, if you install the plugins, you will be do everything in PyCharm itself. [14:08] We are going into other direction than Python, let us come back to today's session. [14:08] When you read with a login, say ready here. [14:09] ready [14:09] ready [14:09] I will 3 more minutes [14:10] ready [14:10] ready [14:10] ready [14:10] Poeple you can also try IDEL ide as well. It is good for a start. [14:10] ready [14:11] s/poeple/people [14:11] ahole[m] - let me just follow instructions here for now! [14:11] jasonbraganza, you are right! [14:12] ready [14:12] I will wait one more minute [14:12] kushal done login with azure notebooks but dont have an IDE [14:13] ready [14:13] ready [14:14] Everyone click on library, create a library dgplug [14:14] so the friendly name and id both are dgplug [14:14] Make sure to check public library [14:15] Like I have https://notebooks.azure.com/kushaldas/libraries/dgplug [14:15] If you have any problem, ask here. [14:16] i was disconected for last 5 minutes - imissed last task [14:16] ! [14:16] yurii, Everyone click on library, create a library dgplug [14:16] so the friendly name and id both are dgplug [14:16] next [14:16] yurii: check pm you [14:16] kushal, dgplug library showing status stopped . [14:17] Is it correct? [14:17] asraisingh, Yes, click on it to go inside of it. [14:18] ok done [14:19] Everyone should see something like https://kushaldas.in/emptylibrary.png [14:19] tell me if you don't see that [14:20] Click on +New [14:20] Give name of the notebook as "summertraining" [14:20] ! [14:20] and select python3.6 as language [14:22] next [14:22] we have to give library description also? [14:22] poojaencoded, nope [14:22] and after creating the notebook, click on it [14:22] okay :) [14:23] https://kushaldas.in/readynotebook.png you should see a notebook ready like this. [14:24] kushal: done [14:24] yes [14:25] skat-sd: pm? [14:25] ikshitij, yes [14:26] ikshitij, skat-sd please stop talking during the session. [14:26] Next, type print("Hello World") in that box [14:26] and then click on the run cell button [14:27] wow [14:27] Or press Ctrl+enter [14:27] If you press Ctrl+Enter, then it will execute the code, and keep the pointer to the same cell [14:28] If you press Shift+Enter, then it will execute the code, and open a new cell below. [14:28] ! [14:28] After you have done your print function test, now in the same cell add another call, print your name there, and then paste the link to the notebook (from the URL) here. [14:28] next [14:28] what is that "In [ ]"? [14:29] i did run cell 2 times so the number inside those brackets exceeded by 1 ! [14:29] ! [14:29] https://notebooks.azure.com/n/B0Cq1C7t1uo/notebooks/summertraining.ipynb [14:29] https://notebooks.azure.com/n/APiSL37pBnQ/notebooks/summertraining.ipynb [14:30] samridhia, That is show the number of the times (the cell) code has been executed, it will show * it the code is still running [14:30] https://notebooks.azure.com/n/OQPNLcX1k7g/notebooks/summertraining.ipynb [14:30] People, please also add an userid to your profile [14:30] sorry. i think the link is this - https://notebooks.azure.com/run/jasonbraganza/dgplug?dest=/notebooks/summertraining.ipynb [14:30] that will help to get urls like [14:31] https://notebooks.azure.com/n/8kPf4XKSfTQ/notebooks/Summertraining.ipynb [14:31] https://notebooks.azure.com/n/Ngls7KJ2ug8/notebooks/summertraining.ipynb [14:31] https://notebooks.azure.com/n/PMIQyZdjoH0/notebooks/summertraining.ipynb [14:31] https://notebooks.azure.com/n/dIyIs3s7jHE/notebooks/summertraining.ipynb [14:31] oops [14:31] https://notebooks.azure.com/n/iW86aRc6kz4/notebooks/summertraining.ipynb# [14:31] I am wrong, the nice url is upto notebooks [14:31] https://notebooks.azure.com/n/xH9uPHgYcbQ/notebooks/summertraining.ipynb [14:32] https://notebooks.azure.com/n/ByvVT8ANX4w/notebooks/summertraining.ipynb [14:32] next [14:32] https://notebooks.azure.com/n/a2Hd69J3sAI/notebooks/summertraining.ipynb [14:32] https://notebooks.azure.com/n/Ngls7Kj2ug8/notebooks/summertraining.ipynb -this one sorry [14:32] solved, thanks [14:33] anyway [14:33] https://notebooks.azure.com/n/b6ertTltiKg/notebooks/summertraining.ipynb [14:33] jasonbraganza: i thought too because this link is not publicly accessible [14:33] https://notebooks.azure.com/n/R8XoVmUdp4E/notebooks/summer%20training.ipynb [14:33] my second link? [14:33] Python is a dynamic language [14:33] try the following [14:33] 2 + 4 [14:33] 21 * 2 [14:33] https://notebooks.azure.com/n/w50Y87mDsHs/notebooks/summertraining.ipynb [14:34] https://notebooks.azure.com/n/EP4LOasPax4/notebooks/summertraining.ipynb [14:34] https://notebooks.azure.com/n/OVWasR2mXNg/notebooks/summertraining.ipynb [14:34] print(2 + 4) [14:34] print(21 * 2) [14:34] like these [14:34] You can now do simple arithmetic [14:35] / is for division [14:36] You will have to keep practicing there, it will easier for us to see the errors or output. [14:36] https://notebooks.azure.com/n/PMlQyZdJoH0/notebooks/summertraining.ipynb [14:36] For tonight, start reading from the beginning to operators chapter in http://pymbook.readthedocs.io/en/latest/ [14:37] If you have questions ask for help here. [14:37] Any queries till now? [14:37] ! [14:37] next [14:37] ! [14:37] next [14:38] Why are we using in notebook? [14:38] anuGupta, So that it becomes easier for us to help. [14:38] When i did 2+4 as it is without a print statement it gave out[], what that denotes? [14:38] At least in the starting. [14:39] Later you can use anything you want. [14:39] samridhia, let me check [14:39] https://notebooks.azure.com/run/championshuttler/dgplug?dest=/notebooks/summertraining.ipynb [14:39] OK but It's pretty good [14:39] https://notebooks.azure.com/n/ByvVT8ANX4w/notebooks/summertraining.ipynb [14:39] ! [14:40] samridhia, I can not see that [14:40] samridhia, I can see out[9] [14:40] yes [14:40] and then next empty cell [14:40] next [14:40] i gave a space before print statement but no errors are shown [14:40] https://notebooks.azure.com/skat-sd/libraries/dgplug [14:40] kushal, so why that out[9] and a answer? [14:40] samridhia, means? [14:41] You typed something and then pressed shift enter [14:41] samridhia: link ? [14:41] and it gave you answer and a new cell. [14:41] soumam007, There are few issues, 1. you created a private notebook, 2. you named it wrong, you gave a space between summertraining [14:41] ! [14:41] kushal, when i am not giving a print statement, so how is it that working and showing correct answer with "out[]"? [14:42] samridhia, It is actually returning the result of 2 + 3 [14:42] samikshan, write this [14:42] a = 2 + 3 [14:42] samridhia, ^^ [14:42] next [14:43] i’m on the variables and datatypes lesson [14:43] ok got it kushal [14:43] jasonbraganza, Okay [14:43] should i just type code blindly to understand what happens? [14:44] ok kushal i will create a new one but why isnt it showing the indentation error when i am giving a space, it has nothing to do with the name right? [14:44] it’s kind of pseudo english. i kind of understand it. [14:44] jasonbraganza, you can skip average and temp code [14:44] soumam007, because notebook is smart enough [14:44] jasonbraganza, Yup [14:44] next [14:45] Roll Call [14:45] kushal it’s the reading input from keyboard that is dazzling me :) [14:45] Jason Braganza [14:45] ok :) [14:45] Mahendra Yadav [14:45] Shivam Singhal [14:45] Bhavin Gandhi [14:45] Onyinye Madubuko [14:45] Apoorv Goel [14:45] Deepika Upadhyay [14:45] Mayank gupta [14:45] Samridhi Agarwal [14:45] Kshitij [14:45] Tosin Animashaun [14:45] Anu kumari Gupta [14:45] Abhinav Shirur [14:45] Saikat Dey [14:45] Abhishek Singh [14:45] Akshay Gaikwad [14:45] Soumam Banerjee [14:45] kumar vipin yadav [14:45] Avik Mukherjee ----END CLASS----