Posts

Showing posts from December 6, 2020

Python 3.2 - Comments in Python

  Comments Comments are always used for programmer’s convenience in any programming language. A comment is used to describe the features of a program . When we write program then we can write comments for classes, functions, statements etc. Comments help to understand the code easily. For example, you are working in a software company. You wrote a program of ten thousand lines. After some time, you left the job and a new programmer joined the company. Now the new programmer opens the file which you had written. So before proceeding he has to understand the code first so that he can continue. Now, if you used proper comments in your program then the new guy can understand it very easily and it will take very less time. But if you did not use proper comments in your program then the new programmer will have a lot of difficulties understanding what and why you have written this. So it will waste the time because the new programmer has to understand the whole lengthy code of 10000 lines

Python 3.1 - Variables, Identifiers and Keywords

Image
Data is very important in every field so it should be handled very carefully. Almost all applications that we see in digital world, need data. Best examples are Facebook and YouTube which contain an infinite amount of data. Every day, millions or billions of data is uploaded and downloaded on\from Facebook and YouTube such as images, videos, user names, passwords, date of birth, age, e mails etc. Every data also has some type. For example, when we talk about a user’s age such as ‘Age=28’ then 28 is called the data and ‘number’ is the type of data since 28 is a number. When we write programs then we perform operations on data. Data type refers to the type of data . Type of data must be known before storing data into system because if data type is not known then it may lead to various problems such as undesirable output. These are the common types of data that we use generally. There are many more data types in Python that we will discuss later in this chapter. In pro