Skip to main content

The Concept of Virtual Environment, Indentation and Comments

Lesson 3 - The Concept of Virtual Environment, Indentation and Comments


Hello Guys, I hope you all are doing well. My Name is Vivek Garg and I welcome you all to my Blog Mostly Programing. If you're new here I will suggest you check out my YouTube channel @mostlyprograming. I post 3 New Videos every week, Let's Code Tuesdays, Innovative Thursdays, and Geeky Saturdays. 
Go! Go! Go! Check it out and if you like the content you can maybe give me a subscription or a comment or a like (YOU DECIDE!).

Here in Lesson 3 of Learning Python from scratch, we will be discussing the following topics:
  1. What is meant by a Virtual Environment?
  2. Do we need to create a Virtual Environment for the Basics?
  3. What is the Concept of Indentation?
  4. What possible errors could Indentation cause, if not done properly?
  5. How to write comments in Python?
So, let us get into it.

Virtual Environment

Virtual Environment is very powerful and one of the most used tools in Python. The Virtual Environment tool helps the developer to keep all the settings, Libraries, and Packages required by different python projects separate by creating isolated virtual environments for them.
Now, you must be wondering what do I mean by all these technical terms.
Let me explain, 
Suppose You are working on 3 different Python Projects. One of them uses Python 2.7, the second one uses Python 3.1 and the third python project uses Python 3.9. 

The dependencies i.e all the third-party libraries used, or the setting or the packages used for each project are different. In such cases, the Virtual Environment tool proves to be of great help. The Virtual Environment tool maintains the dependencies of all the projects separately. 

There is a lot more about Virtual Environments but right now I am not going to scare you off with how to create one. We will discuss the virtual environment creation process when it is the right time and we are ready for it. Right now for the basics of python, we don't need to create a virtual environment.



So, Let's move on to the next topic which is the Concept of Indentation.

Indentation

Indentation refers to the white spaces at the beginning of a line of code.
In all the other programming the indentation in code is to increase the readability of the program or the code written whereas indentation in Python is a very important concept. Python uses indentation to indicate the scope of a block of code.

Comments

The # symbol is used for comments in Python.
Comments are used to explain the code or for documentation purposes.
Multiline Comments can also be written inside  ''' ''' triple quotes.
Note: Tripple Quotes can be used but some IDEs may consider them as a string. So it is always advisable to use # for comments.


YouTube Video


Also, If you have any queries, feel free to comment down below and I will try my best to solve, or you can directly DM me at my social media accounts.

Twitter    



Content Creator: Vivek Garg

Comments

Popular posts from this blog

JoyStick HW-504 Interfacing with Arduino

JoyStick HW-504 Interfacing with Arduino Hello Guys, I hope you all are doing well. My Name is Vivek Garg and I welcome you all to my Blog Mostly Programing. If you're new here I will suggest you to check out my YouTube channel  @mostlyprograming . I post 3 New Videos every week, Let's Code Tuesdays, Innovative Thursdays, and Geeky Saturdays.  Go! Go! Go! Check it out and if you like the content you can maybe give me a subscription or a comment or a like (YOU DECIDE!). So, In Today's Tutorial, We are going to see How a PS2 Thumb Joy Stick Works? and How we can use one with an Arduino. Fig. 1 HW - 504 Thumb JoyStick Module When we hear the word joystick, the first thing that strikes our mind is Game Controllers (Like the one shown in Fig. 2). Mainly we use them for playing Games but we can do a lot of fun stuff with them in Electronics. For instance Controlling Robo Cars, Controlling Barrier Gates, etc. Fig. 2 Game Controller Hardware Overview The

Flappy Bird Game with Arduino Uno

Flappy Bird Game with Arduino Uno Hello Guys, I hope you all are doing well. My Name is Vivek Garg and I welcome you all to my Blog Mostly Programing. If you're new here I will suggest you to check out my YouTube channel  @mostlyprograming . I post 3 New Videos every week, Let's Code Tuesdays, Innovative Thursdays, and Geeky Saturdays.  Go! Go! Go! Check it out and if you like the content you can maybe give me a subscription or a comment or a like (YOU DECIDE!). So, Today we are gonna build a fun game with Arduino. This game is called The Flappy Bird game, I bet you must have played this game in your childhood. And if not you can make one today and play. Components Required 1 x BreadBoard 1 x Arduino Uno Board 1 x I2C LCD Display (16x2) 1 x 10 KOhm Resistor 1 x Push Button Jumper Wires USB A/B Cable Circuit Diagram Fig. 1 Circuit Diagram Connections: SCL(LCD) ---> A5/SCL Pin SDA(LCD) ---> A4/ SDA Pin Vcc (LCD) ---> +5Volts Gnd

How to use a Push Button with Arduino

How to use a Push Button with Arduino Hello Guys, I hope you all are doing well. My Name is Vivek Garg and I welcome you all to my Blog Mostly Programing. If you're new here I will suggest you check out my YouTube channel  @mostlyprograming . I post 3 New Videos every week, Let's Code Tuesdays, Innovative Thursdays, and Geeky Saturdays.  Go! Go! Go! Check it out and if you like the content you can maybe give me a subscription or a comment or a like (YOU DECIDE!). In today's tutorial, we are going to see how a push-button works. I know that may sound quite easy to some of you but believe me, it's not as easy as it seems to be (especially for the Newcomers).  So, Today we will be seeing  What is a push-button? How it works? What different configurations can it work in? How to interface one with an Arduino? Also, How to read its status using a software program? How do we control an LED using a Push Button? Let's get started with the Tutorial.