Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10:11 PM <abhiramr> Okay, then we'll start today's session.
- 10:11 PM <abhiramr> Attendance
- 10:11 PM <abhiramr> Abhiram R
- 10:12 PM <Abhishek_Jain> Abhishek Jain
- 10:12 PM <Vaishnavi> Vaishnavi Rao
- 10:12 PM <ramrutha> Amrutha Ramanathan
- 10:12 PM → chetusa joined (chetusa@conference/jsconf/x-gougdnrphvppbcah)
- 10:12 PM <chetusa> Chaitanya.S.A
- 10:12 PM <samruda> Samruda
- 10:12 PM <amjad> Amjad Ali
- 10:12 PM → localhost1 joined (localhost@conference/jsconf/x-joimbbdkysbzveie)
- 10:12 PM <localhost1> Rakesh
- 10:12 PM <abhiramr> Cool. Santosh will join us in a while. Till then I'll moderate the session
- 10:13 PM <abhiramr> So did you see video 4 on the lecture as asked?
- 10:13 PM → pallavi joined (uid13480@gateway/web/irccloud.com/x-mqvcczgcgzubioku)
- 10:14 PM <abhiramr> yes or no?
- 10:14 PM <ramrutha> Half way through
- 10:14 PM <abhiramr> okay, others?
- 10:15 PM <abhiramr> I'm assuming silence is no.
- 10:15 PM <Vaishnavi> Doing nw
- 10:15 PM <abhiramr> Vaishnavi: I suggest you watch it later. Before tomorrow's session.
- 10:15 PM <Abhishek_Jain> yes
- 10:16 PM <abhiramr> All right.
- 10:16 PM <Vaishnavi> Okay
- 10:16 PM <chetusa> could not..
- 10:16 PM <chetusa> :/
- 10:16 PM <abhiramr> Please do watch the videos as they would help you understand algorithms better.
- 10:16 PM <abhiramr> Okay?
- 10:17 PM <Abhishek_Jain> okay cool
- 10:17 PM <Abhishek_Jain> +1
- 10:17 PM <ramrutha> sure abhi
- 10:17 PM <Vaishnavi> Ok
- 10:17 PM <samruda> okay
- 10:17 PM <amjad> Where do you post the links to the videos?
- 10:17 PM <chetusa> yeah.. I know.. They are really good.. I could not today.. :/
- 10:17 PM <abhiramr> amjad: Refer yesterday's summary on the group
- 10:18 PM <abhiramr> Anyway, Richard talks about how the number of bits affect algorithms
- 10:19 PM <abhiramr> although we increase decimal numbers linearly, their respective binary forms are exponential
- 10:19 PM <abhiramr> his video was along those lines
- 10:20 PM <abhiramr> who remembers yesterday's home question?
- 10:20 PM <Abhishek_Jain> i do
- 10:20 PM <abhiramr> can you tell us?
- 10:21 PM <abhiramr> by the time Abhishek_Jain types others think if you have an answer
- 10:21 PM <Abhishek_Jain> yea
- 10:21 PM <abhiramr> shoot!
- 10:21 PM <Abhishek_Jain> how to find tome complexities of algms
- 10:21 PM ← nerret left (guest-nerr@conference/jsconf/x-oxacgjgenpberqdq)
- 10:21 PM <abhiramr> that's a little vague
- 10:21 PM <abhiramr> "given the time complexity its easy to say which algorithm is the better one , but given an algorithm how do you find its time complexity ?? go through the algorithms for bubble sort and insertion sort and find their time complexities "
- 10:21 PM <Abhishek_Jain> and we need to find time complexities of bubble sort
- 10:21 PM <Abhishek_Jain> and nsertion sort
- 10:21 PM <abhiramr> yes
- 10:22 PM <Abhishek_Jain> dude i was typing
- 10:22 PM <Abhishek_Jain> sorry :(
- 10:22 PM <abhiramr> Abhishek_Jain: Okay.
- 10:22 PM <abhiramr> Does anyone have an answer. Hit a !
- 10:22 PM <abhiramr> Does anyone have an answer? Hit a !
- 10:22 PM <ramrutha> a
- 10:22 PM <abhiramr> everyone else?
- 10:23 PM <abhiramr> I'll repeat the question
- 10:23 PM <abhiramr> "given the time complexity its easy to say which algorithm is the better one , but given an algorithm how do you find its time complexity ?? go through the algorithms for bubble sort and insertion sort and find their time complexities "
- 10:23 PM <amjad> a
- 10:23 PM <Abhishek_Jain> a
- 10:23 PM <abhiramr> I meant hit a "!"
- 10:23 PM <Vaishnavi> a
- 10:23 PM <abhiramr> like this
- 10:23 PM <chetusa> a
- 10:24 PM <abhiramr> !
- 10:24 PM <chetusa> !
- 10:24 PM <Abhishek_Jain> hahaha
- 10:24 PM <amjad> lmao
- 10:24 PM — abhiramr lol just now
- 10:24 PM → nerret joined (guest-nerr@conference/jsconf/x-faxsbutxxqcmuwoy)
- 10:24 PM <nerret> lol
- 10:24 PM <abhiramr> Okay cool. ramrutha go ahead. Give your answer
- 10:24 PM <chetusa> finally!
- 10:24 PM <ramrutha> Well u first find the basic step in the algorithm.The basic step is the the single statement which takes most time to execute.
- 10:25 PM <abhiramr> okay.. go on
- 10:25 PM <abhiramr> if anyone has a question, please pose it to ramrutha
- 10:25 PM <ramrutha> And then you see how many times it executes (whether it lies in one or more loops)
- 10:25 PM <Abhishek_Jain> +1 ramrutha
- 10:26 PM <Vaishnavi> +1 kool
- 10:26 PM <ramrutha> That essentially gives us the time complexity of the algorithm
- 10:26 PM <abhiramr> ramrutha: yes you're right
- 10:27 PM <abhiramr> anyone has anything to add?
- 10:27 PM <abhiramr> or oppose?
- 10:27 PM <chetusa> yes
- 10:27 PM <abhiramr> chetusa: go on
- 10:27 PM <chetusa> the step which takes longest
- 10:27 PM <Abhishek_Jain> Main concern is to find the basic step
- 10:28 PM <chetusa> we need to see the size of input to size of output is what matters too
- 10:28 PM <abhiramr> ramrutha: how do you find which step takes the longest time?
- 10:28 PM <Abhishek_Jain> now for bubble sort we have the comaprision which is the basic step
- 10:28 PM ⇐ amjad quit (0116cbc0@gateway/web/freenode/ip.1.22.203.192) Ping timeout: 246 seconds
- 10:28 PM <abhiramr> chetusa: can you be clearer ?
- 10:29 PM <Abhishek_Jain> the basic step can be found out as the one which gets executed the largest number of times..
- 10:29 PM <Abhishek_Jain> correct me if i am wrong
- 10:29 PM <ramrutha> @abhiramr like abhishek explained.Normally the step inside the loop is the basic step
- 10:29 PM <ramrutha> It definitely can't be initialization or declarations
- 10:30 PM <nerret> Most singnifact step
- 10:30 PM <chetusa> like in the 3rd video
- 10:30 PM <ramrutha> It has to be native to the algorithm
- 10:30 PM <abhiramr> okay consider this.
- 10:30 PM <ramrutha> @nerret +1
- 10:30 PM <abhiramr> say i sort a list of numbers. and write it to a file
- 10:30 PM <chetusa> the 2 bits input gives a larger output
- 10:30 PM → sant0sh joined ([email protected])
- 10:30 PM <chetusa> in other words, the
- 10:30 PM <abhiramr> file write operation takes more time
- 10:30 PM <chetusa> complexity is more
- 10:30 PM <sant0sh> Hola!
- 10:30 PM <abhiramr> sant0sh: Hi, we were discussing about this
- 10:30 PM <chetusa> and further, remember the oblivious algo?
- 10:31 PM <abhiramr> "given the time complexity its easy to say which algorithm is the better one , but given an algorithm how do you find its time complexity ?? go through the algorithms for bubble sort and insertion sort and find their time complexities "
- 10:31 PM <Abhishek_Jain> @santosh Hi
- 10:31 PM <nerret> PyBot^, kick sant0sh
- 10:31 PM <ramrutha> @sant0sh Hey
- 10:31 PM <abhiramr> chetusa: yes.
- 10:31 PM <abhiramr> and ramrutha Abhishek_Jain you were right.
- 10:31 PM <sant0sh> Abhishek_Jain, ramrutha o/
- 10:31 PM <Abhishek_Jain> yea see for every step in bubble sort we compare two numbers
- 10:31 PM <Abhishek_Jain> so that it becomes the basic step
- 10:32 PM <chetusa> well, that matters too.. cuz if it is a waste of steps n calculations then its a waste of time too
- 10:32 PM → abraat joined ([email protected])
- 10:32 PM <ramrutha> @abhiramr like i said,the basic step is native to the algorithm
- 10:32 PM <chetusa> @santosh hi!
- 10:32 PM <abhiramr> ramrutha: yes.
- 10:32 PM <nerret> ramrutha, +1
- 10:32 PM <abhiramr> sant0sh: the stage is yours
- 10:32 PM <ramrutha> So the comparison is the native to finding the time complexity
- 10:32 PM <sant0sh> abhiramr, ok thanks
- 10:32 PM abraat → abraar
- 10:33 PM <sant0sh> to be frank i dont know what happened? how much data is completed?
- 10:33 PM <Abhishek_Jain> @ramrutha +1
- 10:33 PM <sant0sh> also i didnt refer to the videos
- 10:33 PM <sant0sh> :P
- 10:33 PM <sant0sh> my work is to teach you guys about the bubble sort
- 10:34 PM <sant0sh> ;)
- 10:34 PM <sant0sh> will do that
- 10:34 PM <abhiramr> sant0sh: yeah, we just saw a few lectures on how to think in algorithmic terms.
- 10:34 PM <sant0sh> abhiramr, ok!
- 10:35 PM <sant0sh> abhiramr, everything was in python i assume
- 10:35 PM <abhiramr> sant0sh: It was not language specific.
- 10:35 PM <Abhishek_Jain> Basic algorithms no implementation till now
- 10:35 PM <sant0sh> abhiramr, ah ok! interesting
- 10:35 PM <abhiramr> guys you can update too.
- 10:35 PM <sant0sh> yes please
- 10:37 PM <sant0sh> let me bring my bot
- 10:37 PM <sant0sh> :)
- 10:37 PM <Abhishek_Jain> today we need to implement in python
- 10:37 PM <Abhishek_Jain> yay
- 10:37 PM — Abhishek_Jain is feeling good
- 10:37 PM <abhiramr> sant0sh: okay
- 10:37 PM → PyBot^ joined ([email protected])
- 10:37 PM <sant0sh> yes lets do some coding ;)
- 10:37 PM <chetusa> :)
- 10:38 PM — ramrutha is excited
- 10:38 PM <nerret> let's get our hands dirty
- 10:38 PM → nitesh joined ([email protected])
- 10:38 PM — nerret opens python interpreter
- 10:39 PM <sant0sh> pingall: session begins now
- 10:39 PM <PyBot^> nitesh, abraar, nerret, pallavi, localhost1, chetusa, Vaishnavi, ramrutha, samruda, Abhishek_Jain, vrishabh, bhoom, maheshkumar, 6A4AAOQV9, abhiramr, psacrifice|away, dash-rai, kaustavdm
- 10:39 PM <PyBot^> session begins now
- 10:39 PM <nerret> haha
- 10:39 PM <chetusa> awesome!!
- 10:39 PM — abhiramr says Naice!
- 10:39 PM → coolbhavi joined
- 10:39 PM <Abhishek_Jain> we are ready to conquer
- 10:39 PM <nerret> it should have pinged only python guys
- 10:39 PM <nerret> it pinged some extra people :P
- 10:39 PM — chetusa wonders how will I run anything without python
- 10:39 PM → hackdroid joined (hackdroid@conference/jsconf/x-ennkbbwdrrymhabs)
- 10:39 PM — hackdroid is here
- 10:39 PM <sant0sh> lets get to the topic
- 10:39 PM <abhiramr> nerret: is Jeevan I'm guessing?
- 10:40 PM — nerret asks abhiram to stop guessing
- 10:40 PM <sant0sh> so today bubble sort in python
- 10:40 PM <hackdroid> @sant0sh yup
- 10:40 PM <sant0sh> Everyone knows about bubble sort?
- 10:40 PM <ramrutha> yes
- 10:40 PM <Abhishek_Jain> yea
- 10:40 PM <chetusa> oblivious?
- 10:40 PM <samruda> yes
- 10:40 PM <nerret> @sant0sh yes
- 10:40 PM <chetusa> yes
- 10:40 PM <Vaishnavi> Yes
- 10:41 PM <hackdroid> @sant0sh did you saw todays TOI?
- 10:41 PM <abhiramr> yes
- 10:41 PM <nerret> about hackerearth
- 10:41 PM <sant0sh> hackdroid, later :P in between a session now
- 10:41 PM <abhiramr> hackdroid: session in progress. we'll chat later
- 10:41 PM <nerret> @sant0sh no deviation please
- 10:41 PM <nerret> @hackdroid*
- 10:41 PM <hackdroid> @sant0sh oops!
- 10:41 PM <sant0sh> can someone explain the logic of bubble sort?
- 10:41 PM <nitesh> sant0sh: does not promote his company on #fsmk
- 10:42 PM <sant0sh> +1
- 10:42 PM <nitesh> i was being sarcastic
- 10:42 PM <sant0sh> pingall: can someone explain the logic of bubble sort?
- 10:42 PM <PyBot^> hackdroid, coolbhavi, nitesh, abraar, nerret, pallavi, localhost1, chetusa, Vaishnavi, ramrutha, samruda, Abhishek_Jain, vrishabh, bhoom, maheshkumar, 6A4AAOQV9, abhiramr, psacrifice|away, dash-rai, kaustavdm
- 10:42 PM <PyBot^> can someone explain the logic of bubble sort?
- 10:42 PM <hackdroid> @sant0sh iit is basically done to minimize the no. of comparision
- 10:43 PM <ramrutha> Each element is compared with the element adjacent to it and swapped if bigger/smaller in each pass.
- 10:43 PM <Abhishek_Jain> The basic logic is we keep comparing two adjacent numbers and the largest number is shifted to last
- 10:43 PM <abhiramr> swapped only if bigger
- 10:43 PM <Abhishek_Jain> +1 Ramrutha Abhiram
- 10:43 PM <hackdroid> @abhiramr it depends
- 10:43 PM <ramrutha> At the end of each pass an element is bubbled to its place
- 10:43 PM <Vaishnavi> Sorting in which succesivd elements are exchanged when the compared is lesser
- 10:43 PM <abhiramr> okay yeah, for ascending/descending
- 10:44 PM <sant0sh> great!
- 10:44 PM <sant0sh> :)
- 10:44 PM <sant0sh> let me summarize
- 10:45 PM <sant0sh> "The bubble sort makes multiple passes through a list. It compares adjacent items and exchanges those that are out of order. Each pass through the list places the next largest value in its proper place. In essence, each item “bubbles” up to the location where it belongs."
- 10:45 PM <abraar> Perfect summary ;)
- 10:45 PM <sant0sh> anyone who didnt understand please ping! :)
- 10:46 PM <hackdroid> @sant0sh proceed :)
- 10:46 PM <sant0sh> ok before going into more of the topic
- 10:46 PM <nerret> let's implement
- 10:46 PM <sant0sh> I would like to know who all know python
- 10:46 PM <nerret> basic python
- 10:46 PM <abhiramr> me
- 10:46 PM <ramrutha> me
- 10:46 PM <samruda> me
- 10:46 PM <abraar> Basic python ..yes
- 10:46 PM <sant0sh> let me rephrase the question! who don't know basic python
- 10:46 PM <chetusa> barely something...
- 10:46 PM <hackdroid> @sant0sh still learning
- 10:47 PM <Vaishnavi> Me
- 10:47 PM <Abhishek_Jain> I dont know
- 10:47 PM <Vaishnavi> Idk
- 10:47 PM <sant0sh> hmm ok!
- 10:47 PM <sant0sh> no problem!
- 10:47 PM <Abhishek_Jain> @vaishnavi Dont use Sms Language :P
- 10:47 PM <sant0sh> +1 Abhishek_Jain :)
- 10:47 PM <Vaishnavi> I don't know. :P
- 10:47 PM <abraar> Laugh out loud :p
- 10:48 PM <hackdroid> @abhishek-jain santosh : concentrate plz
- 10:48 PM <hackdroid> please
- 10:48 PM <chetusa> "plz"
- 10:48 PM <nerret> IDK is fine :P
- 10:48 PM <nerret> it's Internet language
- 10:48 PM <sant0sh> hackdroid, your identity?
- 10:48 PM <coolbhavi> jargons are fine I guess...
- 10:48 PM <hackdroid> @sant0sh shall never be revealed :P
- 10:49 PM <sant0sh> oh yes its fine coolbhavi
- 10:49 PM <sant0sh> :)
- 10:49 PM <sant0sh> I wish i was op
- 10:49 PM <sant0sh> anyways lets get back to session
- 10:49 PM <sant0sh> lets get started with basics of python
- 10:49 PM <coolbhavi> sant0sh, I dont know as I'm a newbie here and m just assuming :)
- 10:49 PM <sant0sh> coolbhavi, using standard rules in irc here!
- 10:49 PM <sant0sh> coolbhavi, using standard rules of irc here!
- 10:49 PM — hackdroid was waiting for this day :)
- 10:50 PM <nitesh> sant0sh: even if you were op you cannot find out. He/She is connected via scrollback
- 10:50 PM — hackdroid python learning finally
- 10:50 PM <nerret> nitesh +1
- 10:50 PM <sant0sh> I would have banned that person
- 10:50 PM <sant0sh> :D
- 10:50 PM <nerret> yeah :P
- 10:50 PM — Abhishek_Jain is excited !
- 10:50 PM <abhiramr> Guys, let sant0sh talk. Don't side-track
- 10:50 PM <coolbhavi> sant0sh, :)
- 10:50 PM <nerret> @coolbhavi okay.
- 10:50 PM <sant0sh> yea sorry
- 10:50 PM <nerret> sant0sh go ahead
- 10:51 PM <sant0sh> what is python?
- 10:51 PM <sant0sh> its question for everyone
- 10:51 PM <coolbhavi> sant0sh, python is a scripting language with oops concepts in it a bit :)
- 10:52 PM <abraar> Python is a programming or scripting language ..its easy to learn coz its more like english
- 10:52 PM <ramrutha> Also Its easy to implement because of the vast collection of libraries
- 10:53 PM <sant0sh> Then?
- 10:53 PM <abhiramr> python is an interpreter based scripting langauge. although it takes a lot of time to execute, it's useful for automation as number of lines of code is lesser
- 10:53 PM <hackdroid> @sant0sh and its interpreter based
- 10:53 PM <abraar> Works at interpretive mode
- 10:53 PM <samruda> and it is interpreted
- 10:53 PM <hackdroid> @abhiramr :P same points same time:P
- 10:53 PM <coolbhavi> abhiramr, takes lot of time to execute?
- 10:54 PM <sant0sh> abhiramr, ^^^
- 10:54 PM <abhiramr> coolbhavi: Python is what you call a heavier language. so the same code takes more resources n time to execute compared to traditional C
- 10:55 PM <coolbhavi> abhiramr, heavier? how do u compare with say Java? :)
- 10:55 PM <abhiramr> coolbhavi: I have not worked with Java. sant0sh to the rescue
- 10:55 PM <chetusa> C is very close to hardware... so, its fast
- 10:56 PM <chetusa> heavier languages are further away which makes them relatively slower..
- 10:56 PM <abhiramr> chetusa: Also C is a procedural way of program. no objects/instances
- 10:56 PM <chetusa> correct!
- 10:56 PM <nerret> chetus: explain the terms "close" an "further"
- 10:56 PM <nerret> and*
- 10:56 PM <chetusa> its not oop...
- 10:56 PM <abhiramr> whereas Java, Python , C++ are all objected oriented
- 10:56 PM <coolbhavi> chetusa, commands module lets u to interact with system
- 10:57 PM <nerret> chetusa: what do you mean by close to the hardware?
- 10:57 PM — hackdroid wondering where is santosh
- 10:57 PM <sant0sh> me listening to debate
- 10:57 PM <sant0sh> go on!
- 10:57 PM — nitesh thinks sant0sh is watching naruto
- 10:58 PM — nerret thinks or wathcing something else
- 10:58 PM <chetusa> The word "low" refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being "close to the hardware".
- 10:58 PM <sant0sh> let me summarize in technical words
- 10:58 PM <chetusa> source: wiki.. :P
- 10:58 PM <sant0sh> "Python is a general-purpose interpreted, interactive, object-oriented and high-level programming language."
- 10:59 PM <chetusa> I could not come out with proper statements.. :
- 10:59 PM <sant0sh> others you with the flow right?
- 10:59 PM <Abhishek_Jain> yea
- 10:59 PM <ramrutha> yup
- 10:59 PM <abhiramr> what do you mean by general-purpose?
- 10:59 PM <Vaishnavi> Yea
- 10:59 PM <hackdroid> @sant0sh yeah go on
- 10:59 PM <nerret> But C is a high level language, right?
- 10:59 PM <chetusa> ya
- 10:59 PM → sarathms joined ([email protected])
- 10:59 PM <abraar> Yes
- 11:00 PM <abhiramr> is there languages with a specific purpose?
- 11:00 PM <abhiramr> sant0sh: ^^^ ?
- 11:00 PM <sant0sh> http://hck.re/aELwuh
- 11:01 PM <sant0sh> @all^^^
- 11:01 PM <sant0sh> check this link which explains about general purpose programming languages
- 11:01 PM <abhiramr> yeah, got it
- 11:01 PM → brat197 joined ([email protected])
- 11:01 PM <abhiramr> they have a wide variety of applications
- 11:02 PM <nitesh> abhiramr: all of them have a single purpose, to convert from one form to another form
- 11:02 PM ↔ sarathms nipped out
- 11:02 PM <abhiramr> nitesh: are you talking about high level to machine code? those forms?
- 11:02 PM <nitesh> yeah
- 11:03 PM <abhiramr> +1
- 11:03 PM <sant0sh> Python is Interpreted language: This means that it is processed at runtime by the interpreter
- 11:03 PM <sant0sh> and you do not need to compile your program before executing it.
- 11:04 PM <sant0sh> python is interactive: it means the you can sit in the python shell and start writing programs directly
- 11:04 PM <sant0sh> python is object oriented language
- 11:05 PM <sant0sh> its takes the concept of abstractions and encapsulation techniques
- 11:05 PM <sant0sh> and yes python is beginners language
- 11:05 PM <sant0sh> quite easy to learn
- 11:05 PM <sant0sh> so till here everyone understood?
- 11:05 PM <abhiramr> yes
- 11:05 PM <chetusa> y
- 11:05 PM <ramrutha> @abhiramr yes
- 11:05 PM <hackdroid> @sant0sh yes
- 11:05 PM <Vaishnavi> Yes
- 11:06 PM <ramrutha> @sant0sh yes
- 11:06 PM — hackdroid teach teach!teach!
- 11:06 PM <sant0sh> great! :)
- 11:06 PM <Abhishek_Jain> yea
- 11:06 PM <sant0sh> if at any point someone doesnt understand just stop me there
- 11:06 PM <chetusa> ok
- 11:07 PM <sant0sh> python name doesnt refer from snake
- 11:07 PM <nerret> damn. I typed so much. I was offline
- 11:07 PM <abhiramr> comes from Monty Python
- 11:07 PM <chetusa> monty python! :)
- 11:07 PM <abhiramr> a comic series
- 11:07 PM <sant0sh> The creator Guido van Rossum loves a series called Monty Python
- 11:08 PM <Abhishek_Jain> oh cool :)
- 11:08 PM <chetusa> yup!
- 11:08 PM <sant0sh> -_-
- 11:08 PM <sant0sh> because of which he named the language python
- 11:08 PM <sant0sh> python is under GPL!
- 11:09 PM <abhiramr> GNU Public Licence - an open source licence
- 11:09 PM <nitesh> *free
- 11:09 PM <nitesh> it is a free software license
- 11:09 PM <abhiramr> my bad.
- 11:09 PM <abhiramr> it's a a free, copyleft license
- 11:09 PM <sant0sh> nitesh, +1
- 11:09 PM <abhiramr> correction ^^^
- 11:10 PM <sant0sh> let me assume everyone is using linux
- 11:10 PM <ramrutha> General Public licence
- 11:10 PM <Abhishek_Jain> yea obviously
- 11:10 PM <nitesh> *GNU/Linux
- 11:10 PM <abhiramr> GNU/linux here
- 11:10 PM <abhiramr> lol
- 11:10 PM <ramrutha> yes
- 11:10 PM <hackdroid> i am
- 11:10 PM <nerret> haha
- 11:10 PM <sant0sh> open your terminal
- 11:10 PM <nerret> ramrutha, virtualbox not counted :P
- 11:11 PM <chetusa> nope!
- 11:11 PM <abraar> +1 nerret
- 11:11 PM — Abhishek_Jain says nice one nerret
- 11:11 PM <sant0sh> ctrl+alt+T in "ubuntu?
- 11:11 PM <chetusa> internet nor working on ubuntu.. :( connection only on windows.... :(
- 11:11 PM <ramrutha> @nerret go die
- 11:11 PM <hackdroid> @sant0sh following
- 11:11 PM <chetusa> *connection working
- 11:11 PM <sant0sh> stop trolling please!
- 11:12 PM <nerret> sant0sh, okay boss
- 11:12 PM <sant0sh> did everyone open their terminal?
- 11:12 PM <ramrutha> sorry sir
- 11:12 PM <chetusa> wired connection acting weird... :/
- 11:12 PM <abhiramr> yes
- 11:12 PM <nerret> @abhiramr yes
- 11:12 PM <nerret> yes
- 11:12 PM <ramrutha> yes
- 11:12 PM <hackdroid> @sant0sh please continue
- 11:12 PM <sant0sh> type "python"
- 11:13 PM <sant0sh> you will get into interactive shell of python
- 11:13 PM <abhiramr> done
- 11:13 PM <hackdroid> @sant0sh got it
- 11:13 PM <Abhishek_Jain> yea
- 11:13 PM <ramrutha> @sant0sh yes
- 11:13 PM <sant0sh> let start by printing data
- 11:14 PM <sant0sh> how do you print in C?
- 11:14 PM <sant0sh> command
- 11:14 PM <Abhishek_Jain> printf
- 11:14 PM <sant0sh> c++
- 11:14 PM <sant0sh> ?
- 11:14 PM <chetusa> cout<<
- 11:14 PM <ramrutha> print "hello"
- 11:14 PM <nerret> printf()
- 11:14 PM <chetusa> c++!!
- 11:14 PM <nerret> cout<<
- 11:14 PM <hackdroid> cout<<
- 11:14 PM <sant0sh> ok
- 11:14 PM <sant0sh> in python you have to type
- 11:14 PM <chetusa> @ramtutha its python code that u told
- 11:14 PM <sant0sh> print 'hello world'
- 11:15 PM <ramrutha> yes
- 11:15 PM <ramrutha> @chetusa +1
- 11:15 PM <chetusa> he asked c++ :P
- 11:15 PM <sant0sh> NOTE: this works in python 2.7
- 11:15 PM <hackdroid> @sant0sh working
- 11:15 PM <sant0sh> in python 3.3 you have use brackets ()
- 11:15 PM <sant0sh> great!
- 11:15 PM <chetusa> really?
- 11:16 PM <sant0sh> chetusa, really for?
- 11:16 PM <nitesh> using brackets
- 11:16 PM <hackdroid> @sant0sh go on
- 11:16 PM <sant0sh> chetusa, yes in python 3.3 you need to use brackets
- 11:16 PM <nerret> I have 2.7.6
- 11:16 PM <nerret> @sant0sh should I update?
- 11:16 PM <Abhishek_Jain> i too have 2.7
- 11:16 PM <ramrutha> 2.7.5
- 11:17 PM <brat197> 2.7.* is fine.
- 11:17 PM <chetusa> Are you using the camp disc? As far as i knw the camp disc has updated one
- 11:17 PM <sant0sh> no need
- 11:17 PM <sant0sh> we are working in python 2.7
- 11:17 PM <nitesh> there are two versions of the interpreters
- 11:17 PM <hackdroid> @chetusa it has 2.7.6
- 11:17 PM <nitesh> i have 2.7 and 3.4 on mine
- 11:17 PM <nerret> no, not the camp distro
- 11:18 PM <chetusa> tried typing python and tab twice?
- 11:18 PM <nerret> nitesh, how to switch? I too have both I think
- 11:18 PM <chetusa> it shows all the versions available..
- 11:18 PM <nitesh> pingall: it is not important
- 11:18 PM <brat197> use 2.7 ....
- 11:18 PM <chetusa> @brat197 yup
- 11:18 PM <nitesh> let him continue
- 11:18 PM <chetusa> +1
- 11:18 PM <sant0sh> if you are using python3.3 then you can shift to python2.7 by typing command in console "python2.7"
- 11:18 PM <nerret> okay (y)
- 11:18 PM <sant0sh> lets get back!
- 11:18 PM <nitesh> or python2
- 11:19 PM <sant0sh> what are the basic arithmetic operations?
- 11:19 PM <nerret> addition, sub, mul, div
- 11:19 PM <nerret> power, sqrt
- 11:19 PM <ramrutha> +,-,*,/
- 11:19 PM <nerret> not basic*
- 11:19 PM <hackdroid> @nerret mod
- 11:19 PM <nitesh> **
- 11:19 PM <nerret> @niteshmod yeah
- 11:19 PM <chetusa> power
- 11:19 PM <chetusa> is **
- 11:19 PM <chetusa> exponent
- 11:19 PM <nerret> yup.
- 11:20 PM <sant0sh> that should be enough for nnow
- 11:20 PM <sant0sh> now*
- 11:20 PM <sant0sh> you can use those operations directly in python console
- 11:20 PM <sant0sh> 2+2
- 11:20 PM <sant0sh> 3*3
- 11:20 PM <sant0sh> like wise experiment with it
- 11:20 PM <sant0sh> 2 min time
- 11:20 PM <nerret> done
- 11:20 PM — Abhishek_Jain is playing with numbers in python
- 11:20 PM <chetusa> interactive environment.. giv an input it gives an output,, :)
- 11:21 PM <ramrutha> done
- 11:21 PM <sant0sh> try exponents
- 11:21 PM <sant0sh> powers
- 11:21 PM <sant0sh> etc
- 11:21 PM <nerret> a**b
- 11:21 PM <ramrutha> **
- 11:21 PM <ramrutha> for exponents
- 11:21 PM <sant0sh> ok fine
- 11:21 PM <sant0sh> lets move on
- 11:22 PM <nerret> yeah
- 11:22 PM <sant0sh> there is no initializing variable here
- 11:22 PM <sant0sh> like you used to do in C, C++ or Java
- 11:22 PM <sant0sh> you can directly use the variable
- 11:23 PM <sant0sh> example
- 11:23 PM <sant0sh> temp = 1
- 11:23 PM <nerret> I object
- 11:23 PM <sant0sh> stores integer value in temp variable
- 11:23 PM <sant0sh> nerret, yes
- 11:23 PM <nerret> @sant0sh you are initializing there
- 11:23 PM <nerret> you are not defining*
- 11:23 PM <brat197> *declaring
- 11:23 PM <sant0sh> sorry i mean declaring
- 11:23 PM <sant0sh> :D
- 11:23 PM <nerret> @sant0sh yup. declaring is the right word :D
- 11:23 PM <sant0sh> thanks for pointing out
- 11:23 PM <nerret> @sant0sh :)
- 11:24 PM <sant0sh> you need not declare in python
- 11:24 PM <sant0sh> only initializing
- 11:24 PM <hackdroid> is it like js
- 11:24 PM <sant0sh> string1 = "hello,wold"
- 11:24 PM <sant0sh> farhaan No
- 11:24 PM <sant0sh> its not like js
- 11:24 PM <chetusa> in js you say var a=""
- 11:24 PM <sant0sh> you declare using var right!
- 11:24 PM <hackdroid> @sant0sh having two datatype numbers and strings?
- 11:24 PM <sant0sh> not here like that
- 11:24 PM <chetusa> but here you dont even need to do that
- 11:25 PM <chetusa> declare a variable.. anything
- 11:25 PM <sant0sh> hackdroid, i didnt understand your question
- 11:25 PM <chetusa> and trye type( name )
- 11:25 PM <chetusa> *try
- 11:25 PM <chetusa> eg a=3.5
- 11:25 PM <chetusa> type(a)
- 11:26 PM <nerret> int
- 11:26 PM <sant0sh> chetusa, i'll go to that topic! please don't go ahead
- 11:26 PM <hackdroid> @sant0sh js has only two datatypes string and number irrespective of float int char etc
- 11:26 PM <chetusa> ok
- 11:26 PM <chetusa> @hackdroid sorry
- 11:26 PM <chetusa> @santosh sorry
- 11:26 PM <sant0sh> hackdroid, in python we have 5 datatypes
- 11:26 PM <sant0sh> @all^^^
- 11:27 PM <sant0sh> 1.number
- 11:27 PM <sant0sh> 2.strings
- 11:27 PM <sant0sh> 3.list
- 11:27 PM <sant0sh> 4.tuple
- 11:27 PM <sant0sh> 5.dictionary
- 11:27 PM <nerret> cool
- 11:27 PM <sant0sh> Everyone is in flow with the session?
- 11:27 PM <nerret> @sant0sh yes
- 11:27 PM <ramrutha> @sant0sh yes
- 11:27 PM <Abhishek_Jain> yes
- 11:27 PM <hackdroid> @sant0sh elaborate on 3 4 5
- 11:27 PM <Vaishnavi> Yea
- 11:27 PM <abhiramr> yes
- 11:27 PM <chetusa> y
- 11:27 PM <sant0sh> hackdroid, please hold the seat i'll tell you soon
- 11:28 PM <sant0sh> Numbers
- 11:28 PM — hackdroid is sorry , got excited
- 11:28 PM <sant0sh> you can initialize a variable as number using like this
- 11:28 PM <sant0sh> var1 = 1
- 11:28 PM <sant0sh> var1 = 2
- 11:28 PM <sant0sh> var3 = 2.3
- 11:28 PM <chetusa> @sant0sh ?
- 11:28 PM <sant0sh> you can use type(var1)
- 11:29 PM <chetusa> var1=1 or 2?
- 11:29 PM <sant0sh> to find out about the variable type
- 11:29 PM <sant0sh> var1 = 1
- 11:29 PM <sant0sh> var2 = 3
- 11:29 PM <sant0sh> its just an example
- 11:29 PM <nerret> chetusa, it will just replace the old value :P
- 11:30 PM <sant0sh> lets move on to strings
- 11:30 PM <chetusa> ya... i knw
- 11:30 PM <chetusa> :P
- 11:30 PM <sant0sh> you can define string in single quotes('), double quotes(") or triple quotes(''')
- 11:30 PM <sant0sh> example
- 11:30 PM <sant0sh> string1 = 'hello'
- 11:30 PM <sant0sh> string2 = "hello"
- 11:30 PM <sant0sh> string3 = '''hello world'''
- 11:31 PM <nerret> any significance about triple quotes?
- 11:31 PM <sant0sh> yes
- 11:31 PM <nerret> what?
- 11:31 PM <sant0sh> you can use triple quotes to comment code also
- 11:31 PM <Abhishek_Jain> it prints the quotes also
- 11:31 PM <sant0sh> will tell you later about that
- 11:31 PM <hackdroid> @sant0sh why all three? significance?
- 11:31 PM <sant0sh> its also used to print in multiple lines
- 11:31 PM <nerret> @sant0sh okay
- 11:32 PM <sant0sh> say you want to print like this
- 11:32 PM <nerret> @sant0sh yeah I tried
- 11:32 PM <sant0sh> this's new
- 11:32 PM <sant0sh> you can use single quote to do that
- 11:32 PM <nerret> in interpreter for multiple lines, ''' can be used
- 11:32 PM <sant0sh> you can't use single quote to do that
- 11:32 PM <sant0sh> that is
- 11:32 PM <sant0sh> 'this's new'
- 11:32 PM <sant0sh> will print "this"
- 11:32 PM <sant0sh> and will raise error for rest
- 11:33 PM <sant0sh> so you have to use
- 11:33 PM <sant0sh> "this's new"
- 11:33 PM <sant0sh> understood?
- 11:33 PM <nerret> Yes :D
- 11:33 PM <nerret> cool stuff
- 11:33 PM <ramrutha> @sant0sh yes
- 11:33 PM <nerret> sant0sh, objection again
- 11:33 PM <sant0sh> nerret, go on
- 11:34 PM <nerret> @sant0sh to print this's new, you should use triple quotes
- 11:34 PM <nerret> '''this's new'''
- 11:34 PM <sant0sh> you can also use double quotes
- 11:34 PM <nerret> @sant0sh okay. sorry. I used two single quotes and tried
- 11:35 PM <sant0sh> nevermind lets move on
- 11:35 PM <nerret> two single quotes and double quote are different
- 11:35 PM <sant0sh> yes
- 11:35 PM <nerret> @sant0sh cool
- 11:35 PM <sant0sh> regarding other datatypes will explain in later state
- 11:36 PM <nerret> sure.
- 11:36 PM <sant0sh> now more on comparison operators
- 11:36 PM <nerret> you mean tomorrow?
- 11:36 PM <sant0sh> now
- 11:36 PM <sant0sh> if you guys can stay awake till 12
- 11:36 PM <sant0sh> :)
- 11:36 PM <nerret> yeah, can stay.
- 11:36 PM <sant0sh> pingall: shall i continue now or will continue tomorrow?
- 11:36 PM <PyBot^> sarathms, brat197, hackdroid, coolbhavi, nitesh, abraar, nerret, pallavi, localhost1, chetusa, Vaishnavi, ramrutha, samruda, Abhishek_Jain, vrishabh, bhoom, maheshkumar, 6A4AAOQV9, abhiramr, psacrifice|away, dash-rai, kaustavdm
- 11:36 PM <PyBot^> shall i continue now or will continue tomorrow?
- 11:36 PM <Abhishek_Jain> yea
- 11:36 PM <ramrutha> continue
- 11:36 PM <Vaishnavi> Nw
- 11:36 PM <Abhishek_Jain> continue
- 11:36 PM <hackdroid> @sant0sh if you go on i dont mind going till 4
- 11:37 PM <sant0sh> lets go on then! :)
- 11:37 PM <chetusa> continue
- 11:37 PM <abhiramr> whoever wants to leave can follow the log.
- 11:37 PM <sant0sh> = is simple assignment operator
- 11:37 PM <abhiramr> both log and summary will be posted in the group
- 11:37 PM <sant0sh> == is comparing the two variable
- 11:38 PM <Abhishek_Jain> same as other languages :P
- 11:38 PM <sant0sh> more you can google about it
- 11:38 PM <sant0sh> yes its very much similar to other languages
- 11:38 PM <nerret> duckduckgo*
- 11:38 PM → Mahesh__ joined (75c011e8@gateway/web/freenode/ip.117.192.17.232)
- 11:39 PM <sant0sh> you can also use logical operators such as
- 11:39 PM <chetusa> check on the internet.. :P
- 11:39 PM <sant0sh> not
- 11:39 PM <sant0sh> and
- 11:39 PM <sant0sh> or
- 11:39 PM <sant0sh> 1.not
- 11:39 PM <sant0sh> 2.and
- 11:39 PM <sant0sh> 3.or
- 11:39 PM <sant0sh> lets jump to decision making
- 11:39 PM <sant0sh> condition I mean
- 11:40 PM <sant0sh> if, else if etc
- 11:40 PM <sant0sh> who doesnt know if construct in C?
- 11:40 PM <sant0sh> @all^^^
- 11:41 PM <nerret> everybody knows, I am assuming
- 11:41 PM <ramrutha> yup
- 11:41 PM <sant0sh> lets not assume!
- 11:41 PM <nerret> ok.. I am assuring.
- 11:42 PM <chetusa> seems like every1 knows..
- 11:42 PM <sant0sh> it will be good if you all respond quickly!
- 11:42 PM <sant0sh> so that session goes faster
- 11:42 PM <sant0sh> :)
- 11:42 PM <Abhishek_Jain> yea sure
- 11:43 PM <hackdroid> go on
- 11:43 PM <abhiramr> yeah
- 11:43 PM <sant0sh> the syntax of if loop is:
- 11:43 PM <Vaishnavi> Continue
- 11:43 PM <sant0sh> ok me continuing now
- 11:43 PM <sant0sh> the syntax of if loop is:
- 11:43 PM <sant0sh> if condition:
- 11:43 PM <sant0sh> data
- 11:43 PM <sant0sh> example:
- 11:44 PM <sant0sh> if 2==2:
- 11:44 PM <sant0sh> print "true"
- 11:44 PM <sant0sh> you can see white space over there
- 11:44 PM <sant0sh> that is indentation
- 11:44 PM <sant0sh> another super power of python
- 11:44 PM <sant0sh> you dont need to put brackets like C or c++
- 11:44 PM <abhiramr> Everyone, read this in your free time : http://pymbook.readthedocs.org/. Bookmark this link. Whenever you have a doubt, refer this!
- 11:44 PM — nitesh if loop?
- 11:45 PM <sant0sh> just use indentation
- 11:45 PM <sant0sh> indentation is 4 spaces or 1 tab
- 11:45 PM <sant0sh> indentation is like brackets in python
- 11:45 PM <sant0sh> is it working in your terminal
- 11:45 PM <sant0sh> @all??
- 11:45 PM <sant0sh> try implementing if loop
- 11:45 PM <nerret> @sant0sh if loop?
- 11:45 PM <nerret> or if conditional?
- 11:46 PM <abhiramr> http://pymbook.readthedocs.org/en/latest/ifelse.html#if-statement
- 11:46 PM <sant0sh> if condition
- 11:46 PM <abhiramr> Implement this ^
- 11:46 PM <nitesh> if construct is a better term
- 11:46 PM <hackdroid> not happening erroe with print statement
- 11:47 PM <ramrutha> indentation error
- 11:47 PM <sant0sh> wait let me send you the code
- 11:47 PM ⇐ sarathms quit ([email protected]) Ping timeout: 255 seconds
- 11:47 PM <chetusa> four spaces or one tab space isn't it..
- 11:47 PM <abhiramr> hackdroid: use pastebin.com to paste the error
- 11:47 PM <abhiramr> sant0sh: u can use this http://pymbook.readthedocs.org/en/latest/ifelse.html#if-statement
- 11:47 PM <nitesh> one more thing, if you want to send some code or output use the something like pastebin
- 11:47 PM <hackdroid> @abhiramr IndentationError: expected an indented block
- 11:48 PM <hackdroid> >>> if 2==2:
- 11:48 PM <hackdroid> ... print "true"
- 11:48 PM <hackdroid> File "<stdin>", line 2
- 11:48 PM <hackdroid> print "true"
- 11:48 PM <hackdroid> ^
- 11:48 PM <hackdroid> IndentationError: expected an indented block
- 11:48 PM <sant0sh> http://code.hackerearth.com/b266d6r
- 11:48 PM <sant0sh> check this
- 11:48 PM <ramrutha> okay got it
- 11:48 PM <nerret> hackdroid: use a tab space
- 11:48 PM <nitesh> hackdroid: use pastebin
- 11:48 PM <nerret> and please don't paste the code here
- 11:48 PM <abhiramr> hackdroid: use pastebin.com
- 11:48 PM <sant0sh> try checking the codevideo side to see how its done
- 11:48 PM <sant0sh> when everyone is ready ping me
- 11:48 PM <nerret> http://ideone.com/6hbtTY
- 11:49 PM — abhiramr feels codetable is cool
- 11:49 PM <nerret> sant0sh: ping
- 11:49 PM <nitesh> use something like http://paste.debian.net/ to paste code or output
- 11:49 PM <sant0sh> anything is fine!
- 11:50 PM <nerret> or paste.ubuntu.com :P
- 11:50 PM <brat197> +1 for codetable
- 11:50 PM <nitesh> ya anything
- 11:50 PM ⇐ Vaishnavi quit ([email protected]) Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )
- 11:50 PM <nitesh> don't paste on channel
- 11:50 PM <ramrutha> @sant0sh done
- 11:50 PM <sant0sh> great! :)
- 11:50 PM <abhiramr> sant0sh: We'll end at 12.
- 11:50 PM <sant0sh> sure
- 11:50 PM <chetusa> @sant0sh I need a workspace..
- 11:51 PM <sant0sh> i said codetable because you can see how i coded in that using codeVideo in right panel!
- 11:51 PM <chetusa> I dont have python on windows...
- 11:51 PM <sant0sh> try code.hackerearth.com
- 11:51 PM <nerret> you can install
- 11:51 PM <sant0sh> you can compile codes there
- 11:51 PM <sant0sh> :)
- 11:51 PM <hackdroid> @sant0sh great
- 11:51 PM <chetusa> ty
- 11:51 PM <brat197> advertisement zyada ho gaya
- 11:52 PM <nerret> haha
- 11:52 PM <sant0sh> :D
- 11:52 PM <abhiramr> lol
- 11:52 PM <nitesh> +1 brat197
- 11:52 PM <sant0sh> ok lets get back to session
- 11:52 PM <nerret> increment milega
- 11:52 PM — hackdroid codetable is sweet :)
- 11:52 PM <sant0sh> http://code.hackerearth.com/b266d6r
- 11:52 PM <sant0sh> check this
- 11:53 PM <sant0sh> on how to implement if-else
- 11:53 PM <sant0sh> when done ping me
- 11:54 PM <nerret> @sant0sh ping
- 11:54 PM <abhiramr> working
- 11:54 PM <abhiramr> sant0sh:
- 11:54 PM <sant0sh> nerret, tell me
- 11:54 PM <ramrutha> @sant0sh done
- 11:54 PM <nerret> you asked to ping when done
- 11:54 PM <nerret> :P
- 11:54 PM <ramrutha> @nerret :D
- 11:54 PM <hackdroid> @sant0sh done
- 11:54 PM <sant0sh> ok great!@
- 11:55 PM <sant0sh> will move to next
- 11:55 PM <sant0sh> everyone knows about for loop right?
- 11:55 PM <abhiramr> yes
- 11:55 PM <ramrutha> @sant0sh yes
- 11:55 PM <hackdroid> yeah
- 11:55 PM <sant0sh> who doesnt know please tell me quickly
- 11:56 PM <brat197> finish off today by showing them how to swap two variables :P
- 11:56 PM <sant0sh> :)
- 11:56 PM <Abhishek_Jain> yes
- 11:56 PM <sant0sh> ok will move to for loops
- 11:57 PM <sant0sh> range(10)
- 11:57 PM <sant0sh> displays from 0 to 9
- 11:57 PM <sant0sh> try in your terminal
- 11:57 PM <nerret> yes
- 11:58 PM <hackdroid> @sant0sh that was so cool
- 11:58 PM <Abhishek_Jain> done
- 11:58 PM <sant0sh> great! :)
- 11:58 PM <ramrutha> @sant0sh done
- 11:58 PM <sant0sh> syntax of for loop is
- 11:58 PM <sant0sh> for iterating_var in sequence:
- 11:58 PM <sant0sh> statements(s)
- 11:59 PM <sant0sh> for example check this
- 11:59 PM <sant0sh> http://code.hackerearth.com/b266d6r
- 11:59 PM <sant0sh> when done tell me'
- 11:59 PM <abhiramr> done
- 12:00 AM <nerret> @sant0sh done
- 12:00 AM <ramrutha> @sant0sh done
- 12:00 AM <sant0sh> anywhere you guys stuck in?
- 12:00 AM <sant0sh> any doubts?
- 12:00 AM <nerret> @sant0sh how to give custom range?
- 12:00 AM <hackdroid> @sant0sh cool
- 12:01 AM <sant0sh> range(4,10)
- 12:01 AM <sant0sh> nerret, ^^^
- 12:01 AM <nerret> @sant0sh cool.. thanks
- 12:01 AM <nerret> done
- 12:01 AM <sant0sh> great!
- 12:01 AM <sant0sh> now i hope you know for loop
- 12:01 AM <chetusa> @sant0sh
- 12:01 AM <sant0sh> :)
- 12:01 AM <sant0sh> chetusa, yes tell
- 12:02 AM <hackdroid> @sant0sh so every time we use for loop we use this way only not the usual syntax?
- 12:02 AM <chetusa> @sant0sh if i give tab space or space there
- 12:02 AM <chetusa> it gives error
- 12:02 AM <chetusa> but i put print"asdad"
- 12:02 AM <chetusa> its working
- 12:02 AM <sant0sh> where did you execute
- 12:02 AM <sant0sh> in codetable^^^
- 12:02 AM <nerret> chetusa, send the link
- 12:02 AM <sant0sh> chetusa, yes send the link
- 12:02 AM <chetusa> @sant0sh ya
- 12:03 AM <sant0sh> in codetable it automatically puts space or tab
- 12:03 AM <sant0sh> you need not put explicitly
- 12:03 AM <Abhishek_Jain> it works even if we give more than one tab..i tried it works
- 12:04 AM <sant0sh> oh is it
- 12:04 AM <sant0sh> send the link Abhishek_Jain ^^^
- 12:04 AM <Abhishek_Jain> http://code.hackerearth.com/5afc12V
- 12:04 AM <chetusa> @sant0sh http://code.hackerearth.com/cab8bbX
- 12:05 AM <sant0sh> chetusa, else is under the if loop
- 12:05 AM <nerret> @chetusa your else has gone inside the if
- 12:05 AM <sant0sh> see the indentation
- 12:05 AM <nerret> it should come out
- 12:05 AM <Abhishek_Jain> @santosh It works right ?
- 12:05 AM <sant0sh> haha yes
- 12:06 AM <nerret> chetusa, check http://code.hackerearth.com/181054D
- 12:06 AM <sant0sh> anyways lets finish it here!
- 12:06 AM <nerret> I fixed your code
- 12:06 AM <sant0sh> will get back to you when you guys want another session
- 12:06 AM <sant0sh> :)
- 12:06 AM <nerret> @sant0sh come tomorrow
- 12:06 AM <abhiramr> sant0sh: Giving assignment?
- 12:06 AM <hackdroid> santosh coming tomorrow? right?
- 12:06 AM <Abhishek_Jain> yea see you tomorrow Santosh
- 12:07 AM <nerret> yeah, assignment please
- 12:07 AM <sant0sh> one assignment
- 12:07 AM <sant0sh> to all
- 12:07 AM <nerret> i think bubble sort in python would be a good assignment
- 12:07 AM <sant0sh> *
- 12:07 AM <sant0sh> **
- 12:07 AM <sant0sh> ***
- 12:07 AM <sant0sh> *****
- 12:07 AM <nerret> @sant0sh that is easy :P
- 12:07 AM <chetusa> ty
- 12:07 AM <sant0sh> try to print this in python
- 12:07 AM <chetusa> @nerret
- 12:07 AM <sant0sh> question to all
- 12:07 AM <nerret> @sant0sh will submit now itself
- 12:07 AM <ramrutha> @sant0sh okay
- 12:07 AM <chetusa> cool
- 12:08 AM <sant0sh> pingall: how to swap two numbers
- 12:08 AM <PyBot^> Mahesh__, brat197, hackdroid, coolbhavi, nitesh, abraar, nerret, pallavi, localhost1, chetusa, ramrutha, samruda, Abhishek_Jain, vrishabh, bhoom, maheshkumar, 6A4AAOQV9, abhiramr, psacrifice|away, dash-rai, kaustavdm
- 12:08 AM <PyBot^> how to swap two numbers
- 12:08 AM <Abhishek_Jain> yea cool
- 12:08 AM <sant0sh> professionals need not answer this
- 12:08 AM <sant0sh> reply now
- 12:08 AM — abhiramr types ans erases
- 12:08 AM <chetusa> for?
- 12:08 AM <abhiramr> *and
- 12:08 AM <chetusa> swap or pattern
- 12:08 AM <chetusa> or both
- 12:09 AM <sant0sh> a=2
- 12:09 AM <sant0sh> b=3
- 12:09 AM <sant0sh> swap these two variables in one line
- 12:09 AM <hackdroid> @sant0sh using two variable or temporary variable?
- 12:09 AM <sant0sh> no temporary variable
- 12:10 AM <hackdroid> a=a+b
- 12:10 AM <Abhishek_Jain> a=a+b,b=a-b
- 12:10 AM <hackdroid> b=a-b
- 12:10 AM <sant0sh> nope
- 12:10 AM <sant0sh> one line thats it
- 12:10 AM <hackdroid> a=a-b
- 12:11 AM — Abhishek_Jain is thinking ! wait !
- 12:11 AM <ramrutha> (a,b)=(b,a)
- 12:11 AM <Abhishek_Jain> a=a+b && b=a-b
- 12:11 AM <chetusa> @ramrutha +1
- 12:12 AM <abhiramr> sant0sh: the cat is outta the bag :P
- 12:12 AM <ramrutha> :-D
- 12:12 AM <hackdroid> @sant0sh i still didnt get that
- 12:12 AM <sant0sh> ramrutha, good
- 12:13 AM <sant0sh> the answer is
- 12:13 AM <sant0sh> a,b=b,a
- 12:13 AM <hackdroid> @sant0sh elaborate plz
- 12:13 AM <abhiramr> Repeating the assignment - "Please write a Python script to print the following pattern using loops http://pastebin.com/zskDZGg8"
- 12:13 AM <sant0sh> ramrutha, ^^^
- 12:14 AM <abhiramr> hackdroid: we'll finish off with attendance. then u can ask sant0sh
- 12:14 AM <abhiramr> Attendace
- 12:14 AM <abhiramr> Abhiram R
- 12:14 AM <sant0sh> cool
- 12:14 AM <hackdroid> hackdroid
- 12:14 AM <sant0sh> abhiramr, let me make your task easier
- 12:14 AM <ramrutha> its more like re-assigning values
- 12:14 AM <sant0sh> pingall: yell your name
- 12:14 AM <PyBot^> Mahesh__, brat197, hackdroid, coolbhavi, nitesh, abraar, nerret, pallavi, localhost1, chetusa, ramrutha, samruda, Abhishek_Jain, vrishabh, bhoom, maheshkumar, 6A4AAOQV9, abhiramr, psacrifice|away, dash-rai, kaustavdm
- 12:14 AM <PyBot^> yell your name
- 12:15 AM — abhiramr thanks PyBot^
- 12:15 AM <chetusa> Chaitanya
- 12:15 AM <sant0sh> hackdroid, farhan
- 12:15 AM <Abhishek_Jain> Abhishek
- 12:15 AM <ramrutha> Amrutha
- 12:15 AM <abhiramr> < -- SESSION 4 END -- >
Advertisement
Add Comment
Please, Sign In to add comment