----BEGIN CLASS---- [13:33] #startclass [13:33] Roll Call [13:33] Samridhi Agarwal [13:33] Ashwani Kumar Gupta [13:33] Onyinye Madubuko [13:33] Kshitij [13:33] Priyanka Sharma [13:33] Ravindra Lakal [13:33] Abhishek Singh [13:33] Saikat Dey [13:33] pooja kumari singh [13:34] Sakshi Saraswat [13:34] priyansh: sourav [13:34] Anu kumari Gupta [13:34] Bhavin Gandhi [13:34] Akshay Gaikwad [13:34] Soumam Banerjee [13:34] Balaji [13:34] kumar vipin yadav [13:35] Apoorv Goel [13:35] Nikita Kotak [13:35] So, people which all questions did solve over the weekend? [13:36] basics sayan [13:36] NikitaK3: what questions did you solve over the weekend? [13:37] soumam: elaborate what basics [13:37] Print Permutation of a string [13:37] apoorv: what did you solve over the weekend? [13:37] Shivam Singhal [13:38] using if_else what you told last class, and also experimented with range, and a bit of function [13:38] couldnt do much [13:38] some assignments that were given in college [13:38] If people don't speak I will consider that you did not solve/or practice anything over the weekend [13:38] sayan: I use python for Hackererth problems [13:39] apoorv: did not do Python? [13:39] i did those assignments were to be done in python [13:39] Okay [13:40] sayan, I did a few practise problems on hackerearth [13:40] NikitaK3: ikshitij links to your profile? [13:40] i solved some problems on hackerearth and some on hackerrank with python [13:40] I made a ticTac toe game using if statement. [13:40] I did problems on hackerearth in C language. [13:41] Worked on some if else and while loop [13:41] hackerearth.com/@ikshitij [13:41] And tried pattern too [13:41] <_RicharD_> Mayank gupta [13:42] roll call: atul kumar [13:42] pr97: link to hackerearth profile? [13:42] <_RicharD_> Random basic programs on python [13:42] Roll call: akash pathak [13:42] people fpaste your code and paste the link here [13:42] okay sayan [13:43] https://www.hackerearth.com/@priyanka1038 [13:43] sayan: which code ? [13:44] the code you have written over the weekend [13:44] https://paste.fedoraproject.org/paste/d5~UKu1xwcSn88QBbaTZgA [13:46] ikshitij: NikitaK3: I see that the last problem was solved 5 days back [13:46] done nothing using Python this weekend :( [13:46] Next moving to blogging [13:46] How many people are reguarly blogging? [13:46] sayan me [13:46] me [13:46] :) [13:46] me [13:47] :( could not but i will [13:47] sayan, not a regular but do little bit blogging [13:47] me i wrote a blog once in a week [13:47] This is sad [13:48] I am really sad with the people actually writing code, practicing stuffs [13:48] I wrote one blog this weekend [13:48] i will write a blog tonight [13:48] Not reguarly but one post's in a week. [13:48] I follow the students planet regularly and I see a few of the people regularly blogging [13:49] Okay I am starting with looping [13:50] Sometimes you need to execute a part of code multiple times [13:50] so what you do is you loop through the code [13:50] There are primarily three types [13:50] - for loop [13:50] - while loop [13:52] so first I will be covering while loop [13:52] the syntax of while loop is [13:52] while (condition): [13:52] lines to execute [13:53] so this loops keeps on running till the condition is true [13:53] so if need to print the first 10 numbers [13:54] counter = 0 [13:54] while counter < 10: [13:54] print(counter) [13:54] counter = counter + 1 [13:54] [13:54] so this is the code to print the first 10 numbers from 1-10 [13:54] sorry 0-9 [13:55] so, first we intialize the value of the counter to 0 [13:55] then if enters the while loop checks the condition [13:55] counter < 10 which is 0 < 10 which is True [13:55] so the code enters within the while loop [13:55] prints coutner [13:56] next increments the value of counter by 1 [13:57] now the value of the counter is 2 [13:57] so it then checks the value and if true enters the loop [13:57] and if false exits the loop [13:57] any question? [13:58] Okay so no question so moving ahead [13:58] ! [13:58] Roll Call: santosh kumar shaw [13:59] ! [13:59] next [13:59] so while always run the code again [13:59] if the condition is true [13:59] yes [14:00] next [14:00] we say python takes less code , but counter++ is not supported .Its fetching error :( [14:00] ! [14:00] soumam: what do you mean by python takes less code [14:01] soumam: use counter+=1 [14:01] in python they say it takes less line to code the same thing but ++ isnt supported [14:01] ikshitij, ok [14:02] soumam: yes, it's not there [14:02] ikshitij: soumam you should use counter = counter + 1 [14:02] ok [14:02] counter += 1 and counter = counter + 1 is not always equal [14:02] next [14:03] doubt cleared :) [14:03] ! [14:03] next [14:03] ok [14:03] ! [14:03] next [14:03] ! [14:03] can you explain how counter += 1 and counter = counter + 1 is not always equal [14:03] ! [14:03] sayan what is the difference between counter += 1 and counter = counter + 1 ? [14:04] ! [14:04] apoorv: pr97: nope, beyond the scope of class [14:04] next [14:04] next [14:04] sayan: any example or case where i = i+1 and i+=1 is different [14:04] How to stop a stop a program in notebook i enter wrong condition [14:05] sayan: okay [14:05] ikshitij: nope, not now [14:05] kvy_: I need to check that myself [14:05] next [14:05] had the same question as apoorv, pr97. [14:06] kvy_, use the square button [14:06] avik i will try it [14:06] ! [14:06] ok! :) [14:06] SORRY FOR INTERRUPTING! but I’m new and I’m trying to learn the basics here. Request all you more experienced folks to ask comparative and performance questions after class! i don’t care what program is faster. Right now I need ro learn to *write* the darned thing and the questions are slowing the flow [14:07] slow clap to jasonbraganza [14:07] jasonbraganza: right ! [14:08] ok sayan move ahead :) [14:08] brb [14:09] hello jasonbraganza , so you are liking this? :) [14:10] back [14:10] next [14:10] move ahead:) [14:10] jasonbraganza: well, I did take a long lecture one this but people just don't care to listen [14:11] s/one/on [14:11] Okay, I am glad to see that I did a typo, a major one [14:11] but nobody noticed, or rectified it [14:11] or raise hand to ask why [14:12] i’ll just turn ornery like this next time ! [14:12] This totally tells how much the class reads the log that I type [14:13] I won't be correcting it, it's on you to figure out [14:13] Moving ahead [14:13] sayan, the do-while loop? [14:14] sayan, you said three types but mentioned two [14:14] sayan - i thought that was a surprise for later [14:14] sometimes you cannot determine the what would be the condition [14:14] sayan: said 3 types of loops but mentioned 2 [14:15] sayan I think python do not support do-while. [14:15] or you probably cannot pass it via the while loop [14:15] that's when you start the infinite loop [14:16] and within the loop you mention the condition and check for the condition [14:16] if the condition is true you tell the code to break out of the loop [14:17] to break out of the loop, you use `break` [14:17] while True: [14:17] if condition: [14:17] break [14:17] so this is the structure of the code then [14:17] any questions till here? [14:18] ! [14:18] avik: there is no do-while loop in Python [14:18] so that had to be 2 types [14:18] sayan, ok! [14:18] sorry! [14:18] there also a known typo I did [14:19] next [14:19] what scenario would I use an infinite loop in? [14:19] jasonbraganza, say you want that calculator to run for an infinite time. [14:20] user wants to calculate one after another [14:20] condition 2<5 [14:20] jasonbraganza: [14:20] understood. when you need persistence of some sort. thank you [14:20] ok i misunderstood [14:20] :D [14:21] jasonbraganza: https://github.com/sayanchowdhury/fedimg/blob/feature/modular-ec2/fedimg/services/ec2/ec2imgpublisher.py#L74 [14:21] check this code [14:21] sayan - will do. thank you [14:21] here I retrying the code, but I don't have the condition to exit out of the loop [14:21] s/I/I am/ [14:22] so I put the condition inside [14:22] you’re waiting until the copy is complete? [14:22] jasonbraganza: yes [14:22] now I undertand why variables have to be cleanly named. Thank you [14:23] next [14:23] jasonbraganza: Similar condition here - https://github.com/fitztrev/weechat-zmq-notifier/blob/master/client/irc-notifier#L49 [14:23] sayan, thanks it helps a lot of issues I had! [14:24] jasonbraganza: Waiting for messages from a server. If we want the messages to keep coming. [14:24] sayan, please continue … [14:25] Write a program [14:26] to take the input from the user `start` and `end`. Then print the numbers between start to end (with end included) using while loop [14:26] and infinite while loop [14:27] Update the azure links here: https://etherpad.gnome.org/p/dgplug-2018 [14:27] Roll Call: Abdul Wahab Abrar [14:27] Also, if you don't put proper link to your notebook I am not checking it [14:28] I will be back in 10 mins [14:28] sayan, 2018? [14:28] sayan should i make 2 program one with while and another with infinite while loop [14:29] I got disconnected, someone please tell what i missed after sayan said-Write a program. [14:29] pr97_ : check pm i sent all messages [14:30] thank you championshuttler :) [14:38] back [14:38] sakshi, Your link doesn't work. It denies access [14:39] ashwanig: your's too [14:39] sayan my net is working too slow, the azure notebooks page is still loading:( [14:39] I have not written the code yet [14:39] anuGupta: your link is also not working [14:40] bhavin192: :) [14:40] bhavin192: can you change the output for In[7] [14:40] ! [14:40] ! [14:41] need some help here [14:41] sayan, I was checking the calendar for current year [14:41] sayan, doing that [14:42] balaji: access denied [14:43] Check your library is public or not. [14:43] ikshitij, I guess now it is working fine : [14:43] ikshitij, Can you check? [14:44] ashwanig: yes ! I can see now [14:44] ikshitij, Thanks :) [14:45] ikshitij, Can you check now? is that showing or not ? [14:45] sayan, can you check it now, the In[15] [14:45] my code is not running after i accidentlly compiled a infinite loop. [14:45] balaji, Nope [14:46] ashwanig : can you please check now [14:46] balaji, Please share the public link [14:46] okay, anybody still doing? [14:46] apoorv you can restart your kernel [14:46] sakshi, Same problem [14:46] Never mind [14:47] ashwanig, In library information it shows public [14:47] balaji: Nope ! It's still private [14:47] bhavin192, ikshitij, abhinavshirur, ravindra, akshayg96, avik did solve the problem [14:47] public library check box is ticked [14:47] avik: why did you use the extra number variable? [14:48] otherwise i had to increment start [14:48] which I thought was not a goot idea [14:48] yes pasted the fpaste link as i am using my local python [14:49] s/goot/good [14:49] avik: okay [14:49] avik: we had no use of start again in program ! [14:49] avik: but we did not use it again you could have used it [14:49] ikshitij, thats true! my bad :( [14:49] avik: it's okay [14:49] sayan, ok. [14:50] any questions? [14:50] can't i able to give link in last class.Is there any problem ? [14:51] kvy_: did not get you, can you elaborate [14:51] and is my program code wrong ? [14:51] [14:51] ! [14:52] I do not take last session so [14:52] kvy_: I don't see the link in there [14:52] next [14:52] anyone pm me please want to know how to make it public [14:52] Done [14:53] sayan But I pasted the link. [14:54] ! [14:54] balaji, https://notebooks.azure.com/bhavin192/libraries/dgplug/html/summertraining.ipynb use this format [14:54] next [14:54] kvy_: I can't see it [14:54] next [14:55] next [14:55] Is there any difference between while(i < 10) and while i < 10 ? [14:55] i dont know what is the problem in my link that i pasted [14:55] sayan i haven't used the azure nootebook but given another link, please check if the code is okay! [14:55] when i am opening the link in my laptop it is opening [14:55] sakshi: follow the format bhavin192 just shared :) [14:56] but ashwanig said its not opening [14:56] ok champioshuttler [14:56] sakshi: Can't see your code [14:56] ashwanig: no [14:56] ashwanig: until you have multiple conditions [14:57] sayan, for that we can use && or `and` [14:57] right? [14:57] ashwanig: yes [14:57] xyz_: looks good [14:57] moving ahead [14:58] sakshi, Your link is not in that format. Check that. [14:58] sayan, Thanks [14:58] I did not see those people whose links where not correct [14:58] ok ashwanig [14:58] ashwanig: && is not supported in python ! [14:58] so at the end bhavin192, ikshitij, abhinavshirur, ravindra, akshayg96, avik, xyz_ are the ones who did it correctly [14:59] ashwanig: yeah && is not supported in python [14:59] Is it not visible yet? [14:59] Oops sorry. :( [15:00] ! [15:00] next [15:00] sayan, why we are using infinite while loop? [15:00] ashwanig: I use 'and' in C also. I just define '&&' as 'and' on top of program :) [15:01] pr97_: I just gave this for the question and practice [15:01] this can be done using the finite loop also [15:01] yes [15:01] but why are we using infinite loop then? [15:01] For next class I want people to build something innovative using whatever you learnt till date [15:01] pr97_: practice [15:01] ikshitij, I wonder why you do that :D [15:02] okay sayan [15:02] so, that includes git also [15:02] and github also [15:03] sayan - as in hosting what we write in a repo online? [15:03] jasonbraganza: yes [15:03] got it. thank you [15:03] Basically whatever you have learnt till that [15:04] jasonbraganza, hosting? [15:04] That includes a bunch of things so I want to see how much of things you actually remember [15:04] Roll Call [15:04] ashwanig - putting it on github [15:04] Jason Braganza [15:04] Shivam Singhal [15:04] Ashwani Kumar Gupta [15:04] Balaji [15:04] Onyinye Madubuk [15:04] Apoorv Goel [15:04] Abhinav Shirur [15:04] Sakshi Saraswat [15:04] Priyanka Sharma [15:04] Anu kumari Gupta [15:04] Akshay Gaikwad [15:04] Ravindra Lakal [15:04] Kshitij [15:04] kumar vipin yadav [15:04] Saikat Dey [15:04] Bhavin Gandhi [15:04] atul kumar [15:05] Samridhi Agarwal [15:05] Krishnanand Rai [15:05] Sandesh Patel [15:05] Gaurav Sitlani [15:05] yurii pylypchuk [15:06] <_RicharD_> Mayankgupta [15:06] sayan, when is the next session? [15:07] Avik Mukherjee [15:07] ashwanig: a comman syntax for both, after writing code in python for few days. I switched to C for few problems and there I started typing print instead of printf, and instead of && ! So I defined a few on top just to avoid errors :) ----END CLASS----