« first day (1 day earlier)    last day (501 days later) » 

7:04 AM
Hello @JohnRennie sir
I don't want this room to be frozen :-(
 
@user8718165 hi
Did you want to ask something, or are you just posting to keep the room alive :-)
 
@JohnRennie sir I recently installed pycharm....can I use it just for simple coding? Its beautiful :-)
I tried that notepad method too but constantly you've to change windows between notepad and cmd
 
I had a quick look at PyCharm and it was so complicated I couldn't immediately see how to use it.
There must be "Introduction to PyCharm" articles or videos out there in Googlespace
 
@JohnRennie sir I'm using the pro version...no need for activation...I cracked it XD
 
Big projects involve hundreds of .py files + other files like images, audio etc. Apps like PyCharm are intended for these large projects where managing hundreds of files is a real task.
 
7:15 AM
@JohnRennie sir please have a look at this imgur.com/7AcjLq8
 
OK, so that worked! :-)
 
@JohnRennie sir do you have the pro version
 
I think I downloaded the educational version. Let me fire up the VM I have it installed on and I'll have a look.
It's the educational version, but I think it's very similar to the Pro version.
 
7:32 AM
@JohnRennie sir sorry...I went away for snacks XD
@JohnRennie yeah sir...that's amazing....isn't it better than the notepad CMD way? what's your view sir?
 
Use whatever you prefer. There is no right or wrong way to code.
 
@JohnRennie sir I'll need your help when stuck
 
I'm happy to help if I can.
Python isn't one of my main languages but I can probably help with simple problems.
 
 
8 hours later…
3:43 PM
@JohnRennie hi
 
@Aladdin hi
 
I don't understand one thing
 
@Aladdin yes?
 
After we use# Set1, it goes to next line with.... showing
Nothing like that is in the image I gave u
The next line is directly accessible.. How
 
Are you typing this into the Python console?
 
3:50 PM
I am typing n command prompt
 
That isn't what is being shown. What that page shows is a Python program that you need to type into a file.
So exit the console, type notepad seti.py and pres return then answer yes to create a new file.
Then type the code in that page into Notepad and save it.
 
Okay. What is console
 
Then at the console type python seti.py to run the program in your file.
 
Ah it's basically like the first program we did
 
That's what I meanby the console.
 
3:54 PM
Ah. Okay
 
Yeah I opened notepad
 
The lines starting with # are comments so whether it's really worthing typing them all is debatable.
That's a lot of typing of lines that don't do anything.
 
They won't show when we run the file on python, right ?
 
Correct.
 
4:00 PM
Why are these two showing different value
 
It's just a rounding error.
Python stores numbers in binary, i.e. base 2, and in base 2 0.1 is a recurring decimal. So the representation of 0.1 in binary has a very small error.
The difference will be due to the different order that Python did the arithmetic. The first one would be (6*1)/10 and the second 6/(1/10).
Exactly why the rounding errors are different in the two cases I don't know.
 
Can you explain what the para is telling about in simple words.. I don't get it
 
@Aladdin you'll have to give a few minutes. I'm currently trying to explain hysteresis lops in another room.
 
Sure.
 
4:19 PM
@Aladdin OK, give me a moment to look at the page ...
@Aladdin OK, where are you getting lost in the explanation on that page?
 
I am lost at the digits shown like 32 =00100000
And they have used space, exclamation, hash tag etc before these also.... Why
 
Computers can only store numbers. Typically they store bytes or groups of 2 bytes or 4 bytes.
So to store a character like a space you need some way of representing it by a number. OK so far?
 
Ok
 
There aren't that many characters in common use. We have the capitals A-Z, lowercase a-z, and a load of punctuation symbols. So in fact we can represent all the common characters by some number from 0 to 127.
 
Yes
 
4:27 PM
The upper limit of 127 is because it's 01111111 in binary so all the common characters can be represented using a 7 bit binary number.
 
So these have like a fixed value that computer recognises
 
Yes.
Some choice has to be made for which number represents which character, and the most popular numbering scheme is called ASCII.
(It stands for something but I forget what)
 
Okay
 
In ASCII numbers 0-31 are reversed so special characters like tab, backspace etc.
In your command prompt type charmap and press enter. You'll see something like this:
This shows how the characters are encoded i.e. which number represents which character.
 
Yeah got it
 
4:31 PM
There isn't any special reason why the characters were encoded in that order. It was just convenient at the time.
That actually shows encodings up to number 255. The numbers from 128 to 255 weren't originally part of the ASCII encoding. They got added later when it became necessary to have extra characters for the accents like é etc.
Python extends the original 0-127 encoding used in ASCII to define the numbers 128-255 and it calls this extension UTF-8.
Again UTF stands for something but I can't remember what.
@Aladdin does this all make sense so far?
 
Is there any link where I can learn these things because I am sorta having trouble
 
There really isn't that much to learn. You don't need to remember the details because you very rarely have to consider what number represents a letter.
 
If I am given a binary number like say 00100 .. How can I guess which number it is?
Like 00100000s 32 in my book
 
Do you mean how do you convert binary to decimal?
 
I know how to convert decinal to binary
 
4:41 PM
So what are you asking? How to convert binary (or decimal) to the corresponding character?
 
Yes
 
You don't need to remember that. Your computer will take care of the encoding for you.
It is almost never necessary that you need to remember what character 01101010 encodes, or conversely what the binary for 'q' is.
Even after using computers for more than 40 years I still don't remember the encodings (apart from a few special cases).
 
Okay. Also when computer is 32 bit or 64 bit,what does it means
 
Do you know what a byte is?
 
No
 
4:53 PM
A byte is just a binary number consisting of 8 bits i.e. a number in the range 00000000 to 11111111 (0 to 255 decimal).
The number 8 bits just happened to be convenient when personal computers were first being designed back in the 1960s.
 
Okay
 
Anyhow the very early computers could manipulate one byte at a time e.g. they could add bytes together.
 
Ok
 
But this is a pain because if you want a number greater than 255 you have to combine two bytes to make a single 16 bit number i.e. 0 to 65535 decimal.
Or for even bigger numbers use 4 bytes to get 0 to erm, about 4 billion.
But the original computers were 8 bit meaning they could only handle one 8 bit number at a time. So to handle multibyte numbers the number had to be split into bytes and added up as separate bytes, which is slow.
It's like if a child is adding 17 and 14 they do it one digit at a time e.g. add 7 and 4 to get 11, write down the 1 and carry 1 then add 1 and 1 plus the carry to get 31.
That would be a one digit computer i.e. it can only add one digit at a time.
@Aladdin OK so far?
 
ok
 
5:04 PM
Well 32 bit computers can handle four bytes at a time i.e. they can add four byte, i.e. 32 bit numbers, directly. This makes them a lot faster at arithmetic than 8 bit computers.
And 64 bit computers can handle eight bytes/64 bits at a time so they are faster again.
 
Ah okay. I got it
 
There probably won't be 128 bit computers for a long time because 64 bit numbers are big enough for pretty much everything we need to do at the moment.
Pretty much all personal computers are 64 bit these days.
Even your phone :-)
I need to go now. I'll be back tomorrow.
 

« first day (1 day earlier)    last day (501 days later) »