Welcome to our programming blog for both beginners and experienced coders. We cover topics such as languages, algorithms, web and mobile dev. Our concise articles have code examples and exercises to improve your skills. We believe programming is for everyone, and welcome feedback. Join us in exploring the fascinating world of coding!
#3 - Which IDE? - Where to write our code?
Get link
Facebook
Twitter
Pinterest
Email
Other Apps
Which IDE?
Now after we have installed python in our systems, we need to know that how can we code in python. For that, there should be a python file made in any of the folders and then we have to open the file in any IDE(Integrated development environment). Sounds confusing, right? But don't worry, everything will be easy very soon. First, let's understand what is an IDE.
What is an IDE?
An IDE(Integrated development environment) is simply software that you can use to edit a code file. Notepad can also be used as a code editor. But the best 2 IDEs for software development in python are Pycharm and Visual studio code. Pycharm is python specific but Visual studio is used for all languages and it is the most famous among all IDEs and is open-source software and offers you a great range of development tools. Here also you are suggested to go for Visual studio code as a beginner.
How to install Visual studio code?
To install VS code (visual studio code) is really a piece of cake as it can be simply downloaded and installed from the official website like any other software. The link to download it is there below. Remember to check "Add open with code action in windows explorer file context menu" and also check "Add to path".
Open any random folder or maybe desktop only or anywhere you like and then right-click. You will see
an option called Open with Code. Click that and wait for Visual studio to get open on that location. You may don't see that option if you didn't click that "Add open with code action in windows explorer file context menu" while installing VS Code. Then you need to uninstall VS Code and then install it again and remember to click.
Now, when you have opened VS Code on a specific folder, at left you can see all the files and folders present there in that folder. Now, take your time and try to understand the whole UI(User Interface) of VS code. Try opening different files in it and do random things to learn more and more about VS Code. Remember, not to open a terminal and running any command in it as it can damage your computer.
How to Open a python file?
Now, click a button () that you will find on the left-hand side. This will create a new file and you will have to give a name to it. Give a random name that you like but remember to add .py at the end to make it a python file. For example - "Myfile.py". Now when the file is made there, click to open that file, and here you will get a text editor in front of you where you have to write all the code which you will learn in this journey.
Can we use any other IDE?
Yes, of course, you can choose any IDE you like. You can go for other IDE's too like IDLE, Pycharm, Spyder, eclipse, Jupyter, Jupyter notebook, sublime text etc.
What Excitement coming next?
Now, as we have done everything needed to write our first code, we will be moving to write. We are now going to learn the most important function in python.
Comments In Python, comments are used to provide explanatory notes or documentation within the code. Comments are lines of text that are ignored by the Python interpreter and are intended for human readers. Python has two types of comments: single-line comments and multi-line comments. Single-line comments start with the hash character (#) and continue until the end of the line. Multi-line comments, also known as block comments, start and end with three quotes ("""). They can be used to provide detailed explanations of a block of code or to temporarily disable code during development. It can span multiple lines and is useful for providing detailed documentation or temporarily disabling code during development. ---------------------------------------------- Code:- print("Let's learn comments") #This is a comment and will be ignored by the system Output:- Let's learn comments ---------------------------------------------- It's worth noting that
Dictionaries Dictionaries offer you a way to store data in a key pair way. You can get any assigned value through the key of it. Dictionaries are created using curly brackets{}. Values are assigned to keys using a colon: and different pairs are separated using a comma. They are used in the following way: - ------------------------------------------------------ Code: - myDict = { "name" : "python" , "level" : "easy" } print(myDict["name"]) Output: - python ------------------------------------------------------ One can also add new values using new key names that do not exist in the dictionary or change the value of existing. ------------------------------------------------------ Code: - myDict = { "name" : "python" , "level" : "easy" } myDict["level"] = "very easy" print(myDict["level"]) Output: - very easy ------------------------------------------------------
Getting started Hello Guys, Python is counted as one of the most demanded programming languages today. Whenever a newbie jumps into coding the first question that comes into his or her mind is which language to learn first. The simplicity and versatility of python make it the best language to be learned first by anyone. Python is a language that teaches a person how coding actually looks like. Advantages of Python:- Versatility - Python is one of the most versatile languages that can be used in many fields. It used for Web development, scripting, hacking, web scraping, data science, Machine learning, etc. Ease - By syntax, Python is the easiest programming language that offers you keywords mostly the same as English words with the same meaning. It is also an indentation language means that there are no confusions due to brackets. Simple Setup - There is no need for environment setup in python and you can simply install it from the official website and run it. Libraries - There are u
Yaah, I also love Visual studio only!!!!
ReplyDelete