Introduction To Python

Welcome again to our Next Tutorial. In this lesson, we are going to learn the basics of python and then going to make a quick code. So let's get started. ➢


Introduction To Python

So, In the last Tutorial, you learned how to install Python IDLE(stands for "Integrated Development and Learning Environment", which is used to write, modify, and execute python scripts.)

So, let's first understand the two different types of modes in which you can write scripts on IDLE.

  • INTERACTIVE MODE

  1. Interactive mode is great for quickly and conveniently running single lines or blocks of code.
  2. It runs a single line code.
  3. The result is shown just after clicking Enter

  • SCRIPT MODE

  1. It is used to write more than single lines.
  2. You write all your code in one text file, or script, and run all the code at once.
  3. In the standard Python shell you can go to “File” -> “New File” (or just hit Ctrl + N) to pull up a blank script in which to put your code.
  4. Then save the script with a “.py” extension.
  5. You have to run the script manually, either select “Run” -> “Run Module” or press F5.
(Don't worry, I am explaining through this 



Getting Started with the Basics

Before getting further, I would like to tell you where is Python used -> 
  • Web Development
  • Software Development
  • Computer Applications
  • Mathematics

What is Python capable of ➤

  • Python can be used to handle big data and perform complex mathematics.
  • Python can be for production-ready software development.

Advantages of Python ➤

  • Python was designed for readability and has some similarities to the English language
  • Easy to use.
  • Has a vast library with great and efficient methods.
  • Fewer codes required as compared to C++ OR Java.

Disadvantages of Python 

  • Slower than C or C++
  • It is not efficient for Mobile Development
  • It consumes a lot of memory

Creating your First Python Programme


Well, Yes it is time to create your own Python Program. So, first, open your IDLE in the Script Mode.

And write the following command 



So, guys, I know you all are surprised now, but this is Trinket, a way through which I can share the codes. So, to run this,  just click the "▶" or play button to run the program. Like this ➤


Print Command

So, guys, you noticed that I used the print command in the above example. So you must be thinking about what is the use of Print Command.
So the use of Print is simple, it is to print or to display on the user's screen.
For example - 
print("This is ME")

So, when we run it, it is gonna show 'This is ME' on the screen. 

So now, I know you have been using IDLE,  but there is an alternative method to use Python without     IDLE. See below ↴


An Alternative Method


Yes, so the next way is through CMD or Command Prompt.

Open it.
Type py. Then write your syntax. And to run your script, Click Enter 

To go out of Python Interference, just write exit().

End Of Tutorial.....

Hope you liked this tutorial.

Don't forget to Follow, Like, and Comment on my Social Pages ➤ Twitter ➤ Instagram ➤ Facebook

Thanks,

Dheeraj





Comments