Python

Memorizing Logic In Python or any Programing language 

 

Image result for python


Today is the day You Start learing about logic. Up to this point, You have done everything you possibly can,reading and writing files to the Terminal, and have learned quite a lot of the math capabilities of Python.


From now on, You will be learning logic. You won't learn complex theories that academics love to study but just the simple basic that makes real programs work and that real programmers need every day.


I’m warning you this won’t be fun at first. It will be downright boring and tedious, but this is to teach you a very important skill you will need as a programmer. You will need to be able to memorize important concepts in your life. Most of these concepts will be exciting once you get them.
You will struggle with them, like wrestling a squid, then one day snap you will understand it. All that work memorizing the basics pays off big later.


Here’s a tip on how to memorize something without going insane: Do a tiny bit at a time through out the day and mark down what you need to work on most. Do not try to sit down for two hours
straight and memorize these tables. This won’t work. Your brain will really only retain whatever you studied in the first 15 or 30 minutes anyway. Instead, what you should do is create a bunch of index cards with each column on the left on one side (True or False) and the column on the right on the back. You should then pull them out, see the “True or False,” and be able to immediately
say “True!” Keep practicing until you can do this.




Once you can do that, start writing out your own truth tables each night into a notebook. Do not just copy them. Try to do them from memory, and when you get stuck, glance quickly at the ones I have here to refresh your memory. Doing this will train your brain to remember the whole table.



Do not spend more than one week on this, because you will be applying it as you go.


The Truth Terms 

Logic on a computer is all about seeing if some combination of these characters and some varibales is True at that point in the program


  • and
  • or
  • not
  • !=(not equal)
  • ==(equal) 
  • >=(greater-than-equal)
  • <=(less-than-equla)
  • True
  • False
You actually have run into these characters before, but maybe not the phrases. The phrases (and,
or, not) actually work the way you expect them to, just like in English.

 

Post a Comment

0 Comments