What is variable? Since it we are talking about variable so it can be anything can be a number ,decimal, word or even a line etc. It has no fix value. In simple words, it is like a container which is used for storing different data values. We can understand a variable by example:- e.q. #Declaring a variable #Suppose variable are Var1, Var2, Var3 Var1="Gurpreet Singh" Var2= 50 Var3= 2.5 # We can know the types of variable by using syntax type() print(type(Var1)) ---> str() . It is string type. print(type(Var2)) ---> int(). It is integer type. print(type(Var3)) ---> float(). Now let us move on next step which is inter-converting ...
After knowing about mathematically calculation using python we come to next which are comments. Comments? These are syntax where are used to explain the python god to any other person, so that it is easy for others to work on such code and they can be able to understand. "Any fool can write code that a computer can understand . Good programmers write code that humans can understand" . Martin Fowler, 2008. So comments are very useful for understand and working on any code easily. There are two types of comments which are used in python :- a) Single line comment:- It is start with #hashtag. ...
Comments
Post a Comment