----BEGIN CLASS---- [13:29] #startclass [13:29] Roll Call [13:29] Sehenaz Parvin [13:29] Amitrajit Bose [13:29] Ananyo Maiti [13:29] Mayank Singhal [13:29] Vishal Kushwaha [13:29] Ola Ajayi [13:29] Ashish Kumar Mishra [13:29] Aravind Menon [13:29] Shiva Saxena [13:30] sahil [13:30] Kumar Vipin Yadav [13:30] Bhavesh Gupta [13:30] Shivam Bansal [13:30] Bhavin Gandhi [13:30] <__rex__> Rakshit Airani [13:30] Vivek Shukla [13:30] Piyush Aggarwal [13:30] Akshay Gaikwad [13:30] shaikh_farhan [13:30] Naman Sharma [13:30] Ashwani Singh [13:30] tabrez khan [13:30] pooja kumari singh [13:30] Aditya Patil [13:31] devesh verma [13:31] Janifa M [13:31] Shamik nandi [13:32] Jagannathan Tiruvallur Eachambadi [13:32] Shubham Sharma [13:32] Prashant Sharma [13:32] Priyanka saggu [13:33] Okay [13:33] So, questions on the pym chapters we asked to read? [13:33] Abdul Raheem :) [13:35] Any questions on the Python chapter we gave for homework? [13:35] Everyone installed mu properly? [13:36] yes [13:36] yes [13:36] yes [13:36] yes [13:36] yes [13:36] yes using pipsi [13:36] ! [13:36] kushal, yes [13:36] sreejith [13:36] yes,also updated system to f28 [13:36] Yes [13:36] Yes [13:36] yes [13:37] yes [13:37] yes [13:37] next [13:37] yes [13:37] So, in the datetime module you store the date in a variable 'd', then how are you generating the day just by {d: %A}; How is that working? ; Ref: https://pymbook.readthedocs.io/en/latest/variablesanddatatypes.html ; [13:38] jeet__, that is just shown as an example, but for details, check http://strftime.org/ [13:38] Roll call : Neeraj Kumar Arya [13:38] Friends use ! to be in queue :) [13:39] kushal, Thanks. Big list [13:39] Any other question still now? [13:40] kushal, nope [13:40] No :) [13:40] has the session begun? [13:40] No [13:40] no [13:40] no [13:40] kps_, yes [13:40] ok kvy [13:40] no [13:41] Good evening everyone! [13:43] no [13:43] Okay [13:45] kushal i have a question [13:45] kps_, type ! [13:46] how to decide o/p of 'or' and 'and' like in -1 and 4 [13:46] :( [13:46] first tell me if you know about boolean values in Python? [13:47] yes i was reading through the docs but couldn't get this [13:47] how is -1 or 4 = -1 [13:48] so for numbers, what is a false value? [13:48] kps_, 4 or -1 is 4, surprisingly [13:48] kushal, 0 [13:49] jeet__, let kps_ answer :) [13:49] kps_, so for numbers, what is a false value? [13:49] 0 [13:50] and the rest of the numbers? (including negative numbers) ? [13:50] true [13:50] kushal, 0 and negative values [13:50] no i think all except 0 are true [13:50] kushal, i think i got it [13:51] kps_, explain [13:51] for or operation if the first one is true it returns true [13:52] else if the second operand is true it returns the second op [13:52] does it return True? [13:52] else 0 [13:52] the first value i meant [13:52] here you go :) [13:53] Good. [13:53] thanks kushal [13:53] And if both are true (non zero) then it returns the first operand. [13:53] yes jeet__ [13:53] kps_, Thanks for pointing out. :) [13:53] jeet__, for or, it does not matter what is the second value if the first value is True [13:53] try this [13:53] 1 and asdfkhgjklsadklfjaskldjfklasjdfkljasdkl [13:53] oops [13:54] 1 or asdfkhgjklsadklfjaskldjfklasjdfkljasdkl [13:54] in the interpreter [13:54] kushal, 1 and asdasdasdasdasd... returns the second op right? [13:54] wow, awesome! [13:55] kushal, Yes actually [13:55] 1 [13:55] kps_, for and, it will try to evaluate both sides of the and . [13:56] kushal, it returns the first operator and the job of 'or' gets done if it is true, no need to check right side [13:56] Interesting :) [13:56] jeet__, kps_ if first value is true It return that and if first value is not true then it go for second value [13:56] yes kushal but in this case since first op is true thus it will return the second op [13:57] kvy, for and? [13:57] or 'or'? [13:57] Do we have anyone who can not understand the above discussion? [13:57] kps_, If first one is correct then it return 1st [13:57] if you can not understand, please speak up. [13:57] Is it like the concept of short circuit and , or ? [13:57] We can take time and explain things now. [13:57] kushal, me [13:57] kushal: me [13:58] Exactly, it's like the flow of current through a wire. [13:58] kushal, me as well [13:58] kps_, for 'or' [13:58] me == can not understand? [13:58] correct kvy [13:59] kushal: yeah [13:59] everyone please stop. [13:59] People who did not understand the above discussion, please answer the following questions or at least try to answer. [14:00] Do you know what is a Boolean value? [14:00] True/False? [14:00] yes [14:00] yes [14:00] Yup [14:00] yes 0=false & 1=true [14:00] yes [14:00] yes [14:00] yes [14:00] in Python, always try to say True or False. [14:01] yes [14:01] The first letter is capital. [14:01] Shaikh_farhan: 0=False and everything else=True [14:01] brute4s99: ok :p [14:02] Shaikh_farhan, :) [14:02] kushal, True [14:02] kushal, True. [14:03] True [14:03] Okay, so what are the Python objects which are counted as False? [14:03] a boolean False to start with. [14:03] means [14:03] a = False [14:04] {} ie an empty dict is also False [14:04] False, 0, None, '' (Empty Strings) [14:04] [] (Empty Lists) [14:05] Folk's let kushal explain please [14:05] kvy, I actually asked :) [14:06] So, 0 is False. [14:06] kushal, ooh :) [14:06] But, -13334 is True. [14:06] Correct? [14:06] yes [14:06] yup! [14:06] Everyone, please try to understand this. [14:06] Tell us you did not understand. [14:06] We can wait [14:07] Yes [14:08] ! [14:08] next [14:08] kushal, False,0,{},[] or None all are False right [14:08] kvy, correct [14:08] ortusolis: said None is False but None and 1 return nothing [14:09] yup, we are coming to that in few minutes [14:09] vshuklajr, ^^ please wait. [14:09] Do you all know/understand what is an operator? [14:10] kushal: okay :) [14:10] kushal, yes [14:10] kushal, yes [14:10] yes [14:11] yes [14:11] yes [14:11] yes [14:11] yes [14:11] yes [14:11] yes [14:11] Okay [14:11] no [14:11] yes [14:11] yes [14:11] shivam2704, what is the question? [14:12] okay, i understand operator [14:12] shivam2704, do you know what is an operator? [14:12] like in simple maths? [14:12] yes [14:12] like + or - or / ? [14:12] kushal, yes [14:12] yes [14:12] yes [14:12] yes [14:12] yes [14:12] kushal, I know operators [14:13] yes,arethematic operators [14:14] yep! [14:14] Good. [14:14] Session Started? [14:14] pooja_s, yes [14:14] pooja_s, yep. [14:14] ! [14:14] There are some other type of operator called logical operators. [14:14] They work based on boolean logic. [14:15] Roll Call:pooja sulakhe [14:15] wait, for sometime, brb [14:16] ! [14:16] ! [14:16] kushal, ok :) [14:16] [OFF-TOPIC] one can use false=False if someone adamantly wishes to use all-small-letters for False. [14:16] is there any today's reference link [14:16] brute4s99, right. [14:16] brute4s99, but should not. [14:16] pooja_s, nope [14:16] pooja_s, not till now [14:17] brute4s99, yes! they can! but should not! [14:17] brute4s99, nope [14:17] false become a variable if you don't use 'F' [14:17] but that will initialise a variable [14:18] lol [14:18] avik:datatypes [14:19] Shaikh_farhan, ? datatypes? [14:19] yes avik that's i am saying false = False means we have a variable name 'false' whose value is False [14:19] next [14:19] kvy, absolutely! [14:19] we said the same thing, but you typed faster than me! lol! [14:19] [OFF-TOPIC] one can use false=False if someone adamantly wishes to use all-small-letters for False. Is that feasible kushal ? [14:20] brute4s99, yes and not! [14:20] brute4s99, do you think any other Python will know that you did this? [14:20] brute4s99, Learn to type based on the programming language you are using. [14:20] next [14:21] kushal,not understood this logical operator part :( [14:21] poojaencoded, I am yet to explain that. [14:21] next [14:21] I'm not saying I practise this personally; it was just a thought, kushal. [14:21] [14:22] I think I am too sleepy. [14:22] not related to the logical operators; but the game of sticks problem in the docs - the user never wins right? [14:22] anyway [14:22] kps_, correct :) [14:22] :) [14:22] but always wins if the sticks are reduced by 1 [14:23] There are two logical operators for us. [14:23] kps_, Which game? Link please :) [14:23] 'and' and 'or' [14:23] jeet__, stop talking in the middle. [14:23] jeet__, its in the looping part of pym [14:23] let us start with and [14:23] sorry kushal [14:23] kps_, Please STOP talking. [14:24] Sorry kushal [14:24] a and b [14:24] if both a and b are True, then the answer is True. [14:26] or any other True value, the value of b is what we see. [14:26] now, if either of then is False, the final value is False. [14:26] Try this. [14:27] a = 1 [14:27] b = 2 [14:27] a and b [14:27] a = -1 [14:27] a and b [14:27] a = 0 [14:27] a and b [14:27] tell me if you still have any question [14:28] type done here if you are ready [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] done [14:29] ! [14:29] done [14:29] done [14:30] done [14:30] done [14:30] done [14:30] ! [14:31] ! [14:32] Please explain the output to the last a and b when a=0 b=2 [14:32] done [14:32] next [14:32] Dhananjaym, wait for your turn [14:32] Dhananjaym, what is the question? [14:33] I changed my Nick from holo irc2 to Dhananjaym [14:33] next [14:33] Please explain me the last one [14:33] if either of then is False, the final value is False. [14:34] Output of a and b returned 0 [14:34] Dhananjaym, if either of the value is false it will print that false value. [14:34] or it gives whatever is the False value. [14:34] ! [14:34] Ok [14:36] next [14:36] kushal, If both are True then it will written b else return the false value am i right ? [14:36] *written = return [14:37] yes, the right hand side value in this case. [14:37] next [14:37] kushal, the 'or' and 'and' in python 3.6 return the OBJECTS causing false / true, not boolean true/false. Right? (Just making sure) [14:37] kushal, ok thank you [14:38] I tried type([] and 123) and output was , kushal [14:38] brute4s99, what is [] ? [14:39] an empty list, kushal [14:39] so here you go. [14:39] next [14:39] brute4s99: it return [ ] [14:39] coming to next operator or [14:39] brute4s99, list. [14:39] vshuklajr: I tried type([] or 123). [14:40] or will evaluate the left hand side, and if only it is True, it will try to evaluate the right hand side. [14:40] brute4s99, type([]) [14:40] Try the or operator now [14:41] okay, kushal [14:41] oops [14:41] I am sleepy [14:41] If either of the side is True, it will return the True value. [14:41] sorry [14:41] I am just too sleepy I think. [14:42] Really sorry [14:42] If the left side is True, then it does not check the left side. [14:42] If the left side is True, then it does not check the right side. [14:43] kushal, xD [14:43] health first, kushal . I think you can call it a day a bit early today! :) [14:43] Thanks, but we are yet to do our new thing today. [14:44] First, tell me if there is any confusion on the 'or' ? [14:44] no confusion, kushal [14:44] kushal, nope [14:44] no :) [14:44] No [14:44] no [14:44] No [14:44] kushal, we can come for a class at 2300h if you want to rest [14:44] no [14:44] no confusion [14:44] no [14:44] no [14:44] Okay. [14:45] Then, try out this chapter for tonight https://pymbook.readthedocs.io/en/latest/ifelse.html [14:45] and this https://pymbook.readthedocs.io/en/latest/looping.html [14:46] kushal, we will resume our session at 2300h ? [14:46] or tomorrow ? [14:46] will do, kushal ! Sleep tight! [14:46] ok kushal good night [14:47] ABD, either tomorrow or day after. [14:47] ABD, let's leave that to 23:00 for the day. seems kushal was up for over a day. [14:47] lol [14:47] Remember that on Wednesday around 9:30PM we have a guest session. ----END CLASS----