Learn Python Programming Language Basics – First Lesson

Python is deemed as the beginner friendly programming language on many forums so if you are want to start learning to program then Python is a good place to start .

First of all download the python package from python.org that will include its compiler IDLE that can be used to write python programs . Basically you can write a python program in notepad and save it with .py extension but we will be using IDLE that is provided with Python 3.5.2 bundle available at python.org.

Math Operators :

Once you have downloaded and installed python setup file open IDLE and a shell with open where you can enter python commands . As a first step lets just use this shell as a simple calculator . enter 2+2 in the shell and see the result. Also use multiplication( * ) ,division ( / )and subtraction ( – ) operators.

python1

As you can see mathematical operations are fairly simple in python so you should not have any problem , try using different combinations of math operators in a single line and hit Enter to execute . See the results.There are many other operators like Modulus ( % ) , Exponent (**)  that you can use in your program.

The order of operators is similar to that in mathematics , but it is a common practice to use brackets if you have multiple operations like ;

2-(3*1)+(6/3)

This will give you an answer of one which is same as 2 – 3 +2  or 2-3*1+6/3 .

Data Types :

As the name suggests data types are like different categories of data based on their type .For example  the number 1 is an integer . data type for any text will be a string .

  • Integers: 1 ,2 , -1 , 6 etc are integers and keyword int is used to represent integers.
  • Floating-point numbers: keyword float is used for floating numbers like -0.5, 0.0, 0.5, 1.0, etc.
  • String: Keyword str is used for strings like , ‘hello’, ‘some text ‘, ’11 apples’, ‘etc!’

We will be using different datatypes so you will get a better understanding about them and come to know that it is important to differentiate between different datatypes.

python1

In the above shown shell , you can see that when you use the text one  python gives an error because it is a string and hence must be enclosed in single quotes as ‘one ‘. Anything within single quotes will be considered as string even if it is a number as you can see from the last result in blue that it is enclosed in single quotes meaning it is a string.

String Concatenation:

Data operators when used with integers or floats act as simple mathematical functions .However if you use data operators with strings their meaning is changes . For Example 2 + 2 will give you 4 , However  ‘Apples’ + ‘Oranges’  will give you ‘ApplesOranges’ .

Exercise: Try using other data operators with different strings and see the results.

pythonStringConcatenation

Don’t forget to add single quotes whenever you are using a string . ‘Apples’ + 2  gives an error because here 2 is considered integer as there are no single quotes around it . Once you add single quotes around 2 then it is processed like a sting same as Oranges.

If you want to add space between Apples and Oranges then you can use something like following in the shell .

‘Apples’ + ‘   ‘  + ‘Oranges’

Look closely at the above line of code , it just using a empty space as a sting enclosed in single quotes . So basically the above line concatenates three strings .Alternatively you can just use space within first string like this : ‘Apples ‘  + ‘Oranges’ . Spaces within String quotes are treated as a space.

Variables :

Variables can have any value you assign them just like variables in mathematics where X and Y are usually used in algebra and different values are assigned to them .Each variable can be used to store single value in computer memory and these values are assigned using equal sign (also called assignment operator ) . For example if you want to create a variable x and assign a value 4 to it then you can do so in python simply by using x = 4 .Note that this variable has an Integer assigned to it so this variable should be treated as an integer . If you assign a string value to any variable as y = ‘Apples’  or y = ‘4’  then that variable (y) will be treated as a string .

>>> x = 4
>>> y = 4
>>> x + y
8
>>>x+1
5

Here we created two variables x and y with values 4 and 6 respectively . As we didn’t use single quotes around 4 and 6 so they are considered integers . and math operators can be used on variables x and y  just as they are used with integers. See that x+y gives 8 .

You can also use these variables for math operations with other integers as the values assigned to these variables are integers. Example , x+1 gives 5 .

If you assign any value to a variable and then in the next step you assign a different value to same variable then the first value will be discarded . For example;

>>> x = 4
>>> x
4
>>> x = 5
>>> x
5
>>>

Here we assigned value 4 to the integer and then value 5 . You can see that the current value of variable x is 5 and first value is replaced with second.

You can also assign Strings to variables and then that variable will be considered as a string.

> x = ‘Apples’
>>> x
‘Apples’

There are some rules regarding naming variables that should be followed or python will give you an error.

  1. Variable should be only one word (i.e no spaces)
  2. Only letters , numbers and underscore can be used.
  3. It should not begin with a number(First word can only be a alphabet or underscore)

Variable names and everything else in python is case sensitive , that means variable x is not equal to variable X . apples are not Apples.

Getting First Freelance Job as Beginner

Freelancer is someone who is self-employed and makes money by working on temporary paid projects that he gets from different clients based on skills.

Freelancing has been around much before internet when people used to find work and get paid for doing tasks that were assigned to them. A freelancer doesn’t work permanently for any one organisation or employer and chooses to work on different projects that he gets from clients. These projects can be very small tasks like writing some article, making a website, solving a math problem and can also be large projects like engineering designs. Becoming a freelancer is suitable for people who both inclined towards self-employment and want to work from home. Even if you are already employed and spare some extra time to freelance jobs then you can easily establish a source of extra income using freelancing.

Benefits of Becoming a Freelancing

Perks of becoming a freelancer are the freedom to work only on jobs that you like and the abundance work that is in your reach.

  • Freedom to work from home on any project that you like and schedule your own work hours.
  • You get to pursue your personal passions that might not be possible in doing a job for some organization where you just work on things that are of interest to your employer.
  • You decide what projects you like and get to decide the money you want for the performing any task.
  • Your portfolio will have variety of projects and most importantly you will have opportunities to learn new things by working on interesting projects.
  • Freelancers are usually paid good amount of money for their work and can choose to work only on jobs that meet their personal criteria.
  • You can work from anywhere in the world so you can be travelling and working at the same time, just need a laptop and an internet connection.

Drawbacks of Becoming a Freelancer

  • As a freelancer you will be dependent on getting projects and if you don’t make new clients then you will not make any money. There is no problem just as long as you have new paid freelance projects coming for you.
  • Getting new clients to hire you can be challenging as there is a lot of competition out there and no matter how low you set your price, there is always someone out there who is willing to do the same work for a lower cost. So maintaining your authority as a freelancer among clients can be challenging and will take time before you start getting regular jobs.

Getting Started

Getting freelancing jobs can be difficult because of competition but that doesn’t mean that you shouldn’t choose freelancing as your career. Freelancing is a profitable industry and many online business connect freelancers with clients without any upfront cost that means you don’t have to pay anyone to get freelance jobs. Currently there are two ways to get online freelance jobs:

  1. Client directly contacts you and invites you to work on something by some client.
  2. Clients posts a new project on some freelance site and you bid on that project with your best offer.

Now, don’t get too excited about the first option because you are probably not that renowned freelancer that everyone would like to hire. Come down to the ground and first learn to get your first freelance project and getting hired. Clients would only hire you directly if you have a good portfolio and if your skills are specifically related to their project. To build a good freelancing portfolio you will need to show some good tasks that you have completed.

As a first step choose one site that you will be using to connect to clients for freelance jobs. There are three sites that I would recommend where you should register and make a good profile.

  1. Freelancer.com – Good for web development and writing jobs but it is too crowded and there are a lot of freelance companies that create a lot of competition. But there are a lot of projects available for you and if you make a good profile and are able to write good proposals then you have chance of getting jobs. There are a lot of established freelancers so my suggestion is to apply for relevant jobs and bid reasonably to get the attention of clients.
  2. Upwork.com – Previously oDesk this site is one of my favorite freelancing sites as there isn’t much competition for freelance companies and there are some good projects always available that are not just related to web development and writing. If you are looking for jobs related to your professional field then I would recommend this site. Another good this about up work is that they give boost to new freelancers and your chances of getting hired here are higher as compared to other options.
  3. Peopleperhour.com – Recommended for people who are comfortable with working on hourly basis as obvious by its name you get hired on hourly rate that you decide. This site offers more jobs for web development, content generation and other internet related stuff like marketing and web design etc.

Getting First Freelance Job

After you have registered on any one of the above mentioned sites, the first challenge you will have to overcome is getting your first job. Finding jobs is not difficult as there are countless clients looking for freelancers. The hard part is to make a strong proposal that will make clients hire you and convince them that you are the right man for this job. The secret to succeed in getting your first freelancing job is the basic idea to show y our clients that you are capable of completing the task better than anyone else because you have all the required skills. To achieve this you have to primarily focus on following two things;

  • Your profile details – Make your profile as informative as possible and provide details about all your skills and professional qualifications. Also list a portfolio of your work that you have done elsewhere. Make sure that when someone views your profile they exactly know what are your skills and qualifications.
  • Your Proposal to client is the first thing that they will see when you bid on any job so it has to be the best and briefly describe your skills and also give a reason why they should hire you . Don’t make grammar mistakes and never beg anyone to hire you because you need money. Focus on the project you are interested in and give reference to previous similar work that you have done based on your qualifications.

5 Simple Ways To Increase Adsense Earnings

Tips and guide to boost your Adsense revenue by optimization of website.

Adsense earnings from your website depends on a number of factors that should all be optimised to generate maximum revenue from your site. As a general rule of thumb more page views mean more people will click on ads through your webpage and your income will increase . So you should focus on getting visitors to your site first and don’t overflow any webpage with ads as that will ruin user’s experience . Instead , you can use simple optimization to have more revenue by displaying ad units on locations where they perform best.

Your earnings from Adsense primarily depend on following two factors that you will need to optimise . Focus on ways to increase Adsense cost per click and click through rate to boost your Adsense earnings.

Increase CPC

Cost per click is the amount of money advertisers are willing to pay for their potential customers .More cpc means more money in your adsense account. Here are a few tips that you can use to increase adsense cpc

  1. To increase adsense cpc you need good keyword research and target high paying ads.You can use Google Keyword Planner Tool to see cpc rates of keywords and focus your website content on high paying keywords to increase cpc . Higher cpc keywords will make more money via adsense . Keyword research is an important and rewarding practice that will not only help you increase adsense income but also get more visitors to your website if you know how to target long tail keywords that have lower competition and are easier to rank in search results.
  2. Make sure that both text and display ads are allowed in ad unit as this will increase the bid cost of ads on your site and significantly impact cost per clicks.If you enable only single types of ads to be shown on your website then this will reduce the amount that advertisers are paying to display ads on your site as Google serves ads based on a bidding model where advertisers bid to show their ads . If you use only single text or display type ads then cpc will reduce as competition between advertisers will be lesser.
  3. Ad sized recommended by Google adsense are another way to increase your revenue . Most successful ad units are 720×90 and 336×280 large rectangle adsense units. Use these two proven successful ad units and show responsive ads for increasing cpc .

Increase CTR

Click through rate is a ratio that represents the percentage of visitors who clicked on ads shown by your site. CTR primarily depends on ads placement and can be improved by tweaking the location of ad units on your webpage.

  1. Try out different locations for ads and select the best performing placements . Usually showing ads above the fold gives best ctr but you can use them in other locations also depending on your page layout .
  2. Enable interest based ads in your Adsense account as that will show ads on your site about things that users are interested about and help in increasing both cpc and ctr.

Use Page Level Ads

Page level ads are newly introduced mobile ads for mobile friendly websites that can be used to increase your earnings .

WordPress default rss and atom feed url

How to get default rss and atom feed url of WordPress site.

WordPress provides rss and atom feed by default that can be used as a sitemap in webmaster tools or just syndicate your content using any feed reader .

WordPress Feed Url Rss Format

The default url of WordPress blog’s rss feed can be accessed by adding  /feed/rss/ at the end of your site’s url.

www.example.com/feed/

www.example.com/feed/rss/

WordPress Feed Url Atom Format

If you want atom feed url of your wordpress blog then simple replace rss with atom and this will give your blog’s feed in atom format.

www.example.com/feed/atom/

WordPress Category Feed Url

Similarly you get rss or atom feed of any category , tag or post page by just adding /feed/ at the end of permalink.

 www.example.com/category/cat1/feed/

You can also get the feed of tags and posts by using similar approach.

Google cloud wordpress hosting cost

Hosting your wordpress site on Google cloud compute engine by creating your own virtual machine gives you complete freedom to make any changes to root files and saves you from all the flaws of hosting wordpress on shared hosts .

A shared hosting account will cost 6-10 USD and it comes with all the problems associated with shared web hosting like resource limitations and shared ip addresses. I always recommend using cloud to host any wordpress site because of their low cost considering the advantages over shared servers.

Google cloud provides click to deploy solution to host your wordpress blog using Compute engine . The price of Google cloud services will depend on your usage but it mainly consists of server cost so you have complete freedom to choose the resources you need based on your budget .

Smallest instance offered by Google Compute engine is f1-micro with 0.06 GB memory and if you are hosting a wordpress site then you will also need a 10 GB storage disk . The monthly cost of this package will be around 4.5 USD . If you are just starting your wordpress project then it is usually recommended to start with this instance as you have the option to upgrade your machine resources later as you need them . Google cloud wordpress hosting cost will include $5.84/month for VM Instance and $0.40/month for 10 GB Standard Persistent Disk. However Google also offers a sustained usage discount so at the end of month this total package will cost you a total of $4.49/month . Which is a very low cost when compared to virtual machines offered by shared hosting companies on internet.

Instance vCPUs Ram
(GB)
10GB Storage Cost
(Per Month)
f1-micro Shared 0.60 1.70 5.79
g1-small Shared 1.75 1.70 15.50
n1-standard-1 1 3.75 1.70 27.25
n1-standard-2 2 7.5 1.70 52.80

These costs per month don’t include 30 percent sustained usage discount provided by Google Compute Engine . Comparing these costs to virtual machine and dedicated servers prices offered by major web hosting companies , there is definitely saving in Hosting wordpress on Google cloud.

Roger Federer Will Not Play Olympic Games in Rio -Calls an end to 2016 season

Earlier in February Roger Federer revealed that he has had surgery on a knee injury which he suffered after the Australian Open.

He announced today that he will not be attending 2016 Olympic games due to that injury and calls an end to his 2016 season for full recovery.

I’m extremely disappointed to announce that I will not be able to represent Switzerland at the Olympic Games in Rio and that I will also miss the remainder of the season. Considering all options after consulting with my doctors and my team, I have made the very difficult decision to call an end to my 2016 season as I need more extensive rehabilitation following my knee surgery earlier this year. The doctors advised that if I want to play on the ATP World Tour injury free for another few years, as I intend to do, I must give both my knee and body the proper time to fully recover. It is tough to miss the rest of the year. However, the silver lining is that this experience has made me realize how lucky I have been throughout my career with very few injuries. The love I have for tennis, the competition, tournaments and of course you, the fans remains intact. I am as motivated as ever and plan to put all my energy towards coming back strong, healthy and in shape to play attacking tennis in 2017. – Roger Federer

So no roger federer tennis this year . Hope he recovers from that injury.

Edit robots.txt file using google cloud ssh

If you are hosting your WordPress website using Google cloud hosting then your robots.txt will be set to default that disallows all search bots from crawling your site . You will need to change the robots.txt file uploaded on your server and edit it so that search engine bots are allowed to crawl your website.

First of all you should check if your robots.txt file actually needs editing or not by viewing it on “www.yoursite.com/robots.txt”  . If somewhere is says ” Disallow: / ” then it is blocking all search bots from crawling your website . You need to change “Disallow:/” to “Allow:/” so that bots can crawl your whole site .

If you need to change your robots txt file then in your Google compute instance initiate an SSH session and then use the following command to access and edit your robots file .To edit Robots.txt file for wordpress using google cloud ssh use following command in SSH .

~$ sudo nano /var/www/html/robots.txt

After editing your file use ctrl+X and Y to save it and exit the session .

Ways To Make Money Online Without Paying Anything

The rise in number of internet users in the past decade has made it possible for everyone to make money online by working from home. Although it is not easy to earn significant amount of money online but if you are persistent enough then you have the opportunity to earn your monthly income from internet .

Common Mistake People Make For Making Money Online:

There are a number of people who leave there jobs to work  online from home and are doing really well in terms of money they are making online but before we continue ,to discuss ways to make money online without paying anything , you need to know the fact that making money on internet is no easy task as it requires hard work ,long hours of research and most importantly patience . Don’t expect to be a millionaire in a year over internet as many so called internet gurus promise .

You probably would have read many articles about how to make money online or get rich fast etc . Well none of them will tell you actually how many people fail to make even a single dollar on internet . As a rough estimate i would say about 90% percent of people trying to make money online fail because they fall for such scams that promise you to make money . But there is no easy way to make money and no short cut to earning lots of money .

Skills Needed To Make Money Online

There are some basic skills that you need to start make money online from home. Here are some most important things that you should know if you want to be successful in making money online.

Start A Blog To Make Money On Internet

First thing you need to do if you want to earn money online is start writing a blog . Don’t think about what you will write on your blog , just start a blog somewhere on Blogspot or WordPress . It doesn’t have to be assosiated with a domain . Blogspot and WordPress are a great way to start your blog in minutes without paying anything . If you haven’t already then go and make a blog .

Think of your blog like a base camp for your ventures on internet and write about things you like . Don’t worry about not getting enough people to read your blog as you will eventually get visitors if you keep on writing . On an average it takes atleast six months to establish a decent blog traffic. As i said earlier don’t expect to start making money within days as it will probably take a lot of time before you will actually make any money. Starting your own blog is important because blogging is an important skill needed to start making money online.

Learn to Make A Website

As you are trying to make money online ,learning to make a website should be on your to do list. It will be the most important skill set that you will need numerous times as you work on finding new income sources.Without knowing how to make a website you will eventually have to pay someone to do this for you and that will cost you unnecessary amount of money . All you need to learn is some basic html and css and you don’t need any prior programming knowledge. You will be needing these skill sets every single day if you are really interesting in making money online.

Think Like An Entrepreneur

People working to earn money online are in many ways similar to entrepreneurs so Start thinking like one. Bring your ideas to life , work on new projects and keep looking for opportunities popping up everyday on internet . And most importantly don’t be afraid to fail . failing is an integral part of your journey to becomming a successful web entrepreneur . So think about innovative ways to earn money online and if your idea fails then don’t just give-up . Move on to the next thing .

Ways To Make Money Online

As the article promised here is a list of ways you can make money on internet without paying anything . None of the ways mentioned here will ask you to pay money and are legitimate ways to earn cash online.

Blogging For Money

Blogging is the best and most common way to make money online. If you  know how to write then starting a blog is the first thing that you should do . There are many ways to make money from a blog  like advertisement , affiliate marketing and selling your services. There are many platforms that allow you to start a new site in minutes without paying anything .

Make Money From YouTube Videos

YouTube is another source of income online but that is not for everyone . You need to be able to produce quality videos that will attract many subscribers to your YouTube channel and get many views. If you can make quality videos then YouTube partner program allows you to earn significant amount of money from your videos . The more views you have , more revenue you will generate from these videos.

Teach Online Courses

If you are an expert in some field and your teaching skills are somewhat polished then you can sell your teaching videos online and places like Udemy . Udemy is a unique platform that allows you to sell your courses  . All you have to do is make a video course about anything you know and upload it at Udemy . You will earn money based on the number of students who enrol for your course . You have the freedom to set any price for your course.

Earn Money As  Freelancer

You can sell your services as freelancer on many sites like Upwork , Freelancers and Fiverr  etc that allows you to bid on projects posted by clients . These sites provide you to find clients that will pay you for working on small projects. Freelancing is an increasingly popular way to make money online as you have the freedom to work on projects you like and charge any amount of fee for your services.

5 Reasons To Avoid Shared Web hosting For WordPress

Selecting the right host for your WordPress blog is the first most important decision you make before starting a new website .

The usual choice of many new WordPress users is shared web hosting as it is advertised to be cheap and affordable with so many features . Majority of people choose shared web hosting thinking that it is affordable and you don’t have to get your hands dirty with setting up your own server .  The reason why shared web hosting became so popular is simply their advertisements , they all tell you that this is the best option for you . To make matters worse , when you search reviews of these hosts all others blogs seem to suggest one or other shared hosting provider and nobody tell you the simple truth that all of them have the same flaws . All these bloggers have affiliate accounts with hosting providers and that is the reason they so eagerly suggest you to use them .

Problem with Shared Web Hosts

  1. The most important dark fact about shared web hosting is the limitations on resources that you can use . They all promise you unlimited everything but when your site starts getting traffic they just aren’t designed to handle it . In most cases your site will be removed from the server to avoid over use of resources .
  2. Speed of a site is very important to search engines and blogs with higher page load speed tend to rank higher in search results . Shared web hosts are slow and it will have a negative impact on your
  3. Your ip address is shared with many other websites . some or most of these sites may have spam content and that will eventually have a bad impact on your ranking in search engines . Ip address is an important factor in ranking sites .
  4. Your site will not be able to handle peak traffics on shared hosting accounts so that is another reason to avoid shared hosting for your new site . Even if you are a small site now , you should be equipped to handle significant amount of traffic to your site without any downtime and slow page load time.
  5. The average cost of basic shared hosting account is about $5 to $9 . That seems reasonable for very small sites that don’t bother about above mentioned problems with shared hosting . But when your blog starts to grow you have no option but to move to a VPS or Dedicated server and the cost of that will be around $100 .

Next time you are inclined to choose shared hosting account for wordpress keep these 5 reasons to change your mind .

Read : Six Most Important Seo Meta Tags

6 Most Important Meta Tags For Seo

Meta tags are important part of on page seo as many search engines still use them to rank your website in search results .

Using right meta tags for your website or blog can significantly increase your ranking in search engines and get more relevant traffic to your page. There are countless meta tags that you can use but here are some of the most important meta tags that you should use on all pages of your site .


  1. <meta charset=”UTF-8″ />
  2. <meta name=”viewport” content=”width=device-width”></meta>
  3. <meta name=”copyright” content=”Copyright (c)2016” />
  4. <meta http-equiv=”content-language” content=”en-us” />
  5. <meta name=”description” content=” Description of your site goes here”/>
  6. <meta name=”author” content=”Your Name”>

Meta Description Tag

You can provide a summary of your page content using meta description tag . Using important keywords in meta description is always a good way to increase ranking . Description provided in this meta tag is also displayed in search results so make sure to write a description that will catch the attention of users who see your site in search .Best practice to write meta description is writing a brief summary of article in less than 160 letters . Search engines only use first 160 words of meta description .

<meta name=”description” content=” Description of your site goes here”/>

Briefly summarize your content in one or two sentences and use your main keyword in meta description.

Meta Keywords Tag

Google experts have repeatedly sad that they don’t use keyword tags any more so meta keywords are not relevant any more.

Meta keywords tell search engines about the major keywords on your page . This information is used by search bots to get an idea about the content on your page and rank your page for these keywords . Keywords used in this meta tag must be relevant to the content provided on page .

<meta name=”keywords” content=”keyword1,keyword2,keyword3″>

If you still want to use them then avoid using too many keywords and keep the number of keywords to about 5 or 6. Only use relevant keywords.

Meta Viewport Tag

Viewport tag help make your page friendly to different screen sizes . This is one of the most important meta tags now and your page must have a viewport tag as visitors to your site will be using different screen sizes . This viewport meta tag makes your site load nicely on all devices.

<meta name=”viewport” content=”width=device-width”></meta>