Skip to main content

Learn Python From Basics. Part 1!

Reference:  https://www.amazon.com/Programming-Python-Complete-Introduction-Language/dp/0321680561
This is going to be a long session of python programming. From this session, we are going to learn about basic python syntax and structures and then move on to the advanced topics. I have divided python into eight different topics. In this blog, we will take a look at the first two pieces. I have tried to make this session as simple as possible and as much interactive as I could. So, what are we waiting for? Let's dive in! Feel free to comment on any part you find difficult.
The eight key pieces  to learn at first in Python are: 1. Data Types 2. Object References 3. Collection Data Types 4. Logical Operations 5. Control Flow Statements 6. Arithmetic Operators 7. Input/Output 8. Creating and Calling Functions 1. Data Types:  There are several built-in data types in python. Here we are going to discuss some of them. In python, the integer has no limit. It is only limited by the machine's m…

How to get GitHub Student Pack, Apply now

 Git is a version control system. GitHub is a web-based hosting service for version control using git. You can save all the projects on GitHub. GitHub has given some benefits for students. They recently are providing the student development pack for the students to give access to developers tools for free. Some of these real world tools are too expensive for a student to use. So, for those students who love the education, this could be just great! To get students developer pack, we are going to follow these steps:

1. First you need to make an account on GitHub. Go to this link https://www.github.com/ and sign up for free.
2. After making an account on GitHub, visit the link https://education.github.com/pack/.

3. Click on “Get your pack” button. 
4. Sign with GitHub with your username and password. 
5. Click on the button “Yes, I’m a Student”.

6. Enter your name and verify your academic status. Add a photo of your identity card where it says “Drop file here or click to upload”. 

7. Enter your College/ School’s name and your graduation year.
8. Then, stating appropriate reason on how are you planning to use GitHub, click on the Submit Request


GitHub will e-mail you once you get selected for the GitHub Student pack.
Here are the tools you are going to get for free


1. Atom: Atom is a text editor, just like sublime. It is a text-editor with plugins and the best part is it is open source.

2. Bitnami: It’s an install cloud application in a single click. The basic plan for Bitnami cost $49 per month but GitHub gives you for free for a year.

3. CrowdFlower: It is a Crowdsourcing and data enrichment platform. We can just get access at $50.

4. DigitalOcean: DigitalOcean provides cloud service for developers. It’s providing $100 platform credit for students.

5. DNSIMPLE: It’s a simple DNS management with one-click services robust API. We get Bronze hosted DNS plan for two years (normally $3/month). 

6. GitHub: Github provides five private repository.

7. HackHands: It’s a live programming help available 24/7. We get it for $25 in platform credit. 

8. Namecheap: Namecheap provides us with dot me domain.

And many more….
I hope you find this article useful. If you have any problem regarding this, drop your questions below on the comment section.

Blog by Saroj Bhattarai
      



Comments

  1. I am glad you wrote about this. This will help a lot of students like me to get hands on real world tools for free or in low cost.

    Keep Blogging!!

    ReplyDelete
    Replies
    1. Thank you Nischal. Keep visiting my blog for more updates. :-)

      Delete

Post a Comment

Popular posts from this blog

How to write PROLOG program for half adder?

In this problem, we are going to implement some logic (of course it is all about logic) that will run calculate the half adder sum and carry. We know has two inputs, and it will give sum and carry which looks like this:





X            Y                 Sum                 Carry
0            0                  0                      0
0            1                  1                      0         
1            0                  1                      0
1            1                  0                      1


So, to implement sum we need XOR gate and to implement Carry we need AND gate.

Here is how we do it:

xORGate(0,0,0).
xORGate(0,0,0).
xORGate(0,0,0).
xORGate(0,0,0).


aNDGate(0,0,0).
aNDGate(0,0,0).
aNDGate(0,0,0).
aNDGate(0,0,0).

halfadder(X,Y,S,C):-xORGate(X,Y,S), aNDGate(X,Y,C). 

Now, you can run this code by giving the values of X and Y.
like this:
halfadder(1,1,S,C)  and the output will be
S=0
C=1


How to generate Golden Ratio by programming?

Golden ratio has been a fascinating topic for last more than 2400 years despite it does not have reliable evidence. Golden ratio is seen in the circle of Sunflower "flower". We can get golden ratio when we divide a line into two parts, the ratio of dividing the large part with small part is equal to the whole length divided by the longer part.

For a programmer it will be more fascinating to know how to code the golden ratio. The most easy way to do this is by using Fibonacci Series. We can use python code like this.




s = 0
a = 1
b = 1
for x in range(9999):
c = a + b
a = b
print (c/b)  #This is the golden ratio
b = c


Golden ratio occurs in nature in different forms. Some of the examples are:
1. Flower Petals
2. Seed Heads
3. Pine Cones
4. Shells
5. Spiral galaxies
6. Hurricanes
7. Fingers
8. Animal Bodies
9. DNA molecules

Thank you!
A blog by Saroj Bhattarai