January 24


Concatenation, Comments, Creating Variables

By Gulab Chand

January 24, 2020

Concatenation :

symbol is used for the concatenation or join 2 strings and it’s also used as the mathematical operations.


+ symbol is concatenate only strings. its not concatenate numbers and strings.it will give you the error.


But if you are pass the number as string format then it can join.


Square root:

When you want to find the square of the number that time we can use “**” (2 stars) symbol.


Comments :

​​Comments are used for just display the information. You can say information about the code like which code is what for. Or also used for the give the heading of the particular project.

Comments are not including in the execution part. Its just for the show the info.

There are 2 types of comments in python

  1. Single line Comments
  2. Multi Line Comments


  • Single Line Comments:
    • It is used when you want to give comment only on single line.
    • You can give single line comment using the “#” (Hash) symbol.



  • Multi Line Comments:
    • Multi Line comment is used for when you want to give comments on multiple lines at a time.
    • You can give multi line comments using Triple single Quotation:




Creating Variables:

Variable is the temporary storage for storing the values.

You can create variables with the use of A-Z characters, word and using the underscore then give any alphabets or word like (_demo).

We cannot create variable using the numbers.

Each and every variable having the data types based on given value. for example, if your variable’s value is 10 then its datatype is integers, if value is Alphabets word then variables type is String. Same for float values and Boolean.

In Boolean if you use any logical operation then its converts into Boolean types.


Gulab Chand

About the author

Gulab Chand Tejwani is an independent consultant.He is a Project Management professional (PMP) and Microsoft Certified Trainer (MCT). He has more then 15 years of experience in Microsoft technologies like Aspnet,SharePoint,Sql server and Cloud Computing as well as in Big Data and Hadoop,Mobile App development.He has also worked as technical project manager..