Get startedGet started for free

What is Python?

1. What is Python?

Hi, and welcome to this introductory Python course. My name is George, and I'll be your instructor. This course introduces Python from scratch, with no prior knowledge required! You'll learn why Python is a popular programming language, key concepts like variables, operators, and loops, and write and run your own code in the DataCamp coding interface. Let's get started! Python is a general-purpose programming language used to build almost any software. But what makes it great? Firstly, Python's high-level syntax looks like natural language, making it easier to understand and learn than most programming languages. Secondly, Python has publicly available software packages, which are code written by other developers that we can use instead of writing a feature from scratch, saving us time. Finally, it's free and open-source, meaning anyone can use, modify, and distribute it as they see fit. Python is like a Swiss Army knife, which is why it's powerful and widely used. Common uses for Python include automation, web development, and AI tasks, such as reporting, web scraping, and image recognition. In this course, we will use the DataCamp coding editor. This editor allows us to write and submit our code. The DataCamp coding editor's interface has two sections, which we will extensively use when learning Python. The first section is the Python script, where we write the Python code. Python scripts are files with the extension .py, and these script files allow us to write Python code in an organized manner. In our example, we can see a script named "script.py," the Python script in which we will write our code by default. This Python script also allows us to run and submit code for evaluation by the DataCamp editor. The second section we will also frequently interact with is the Python shell. Here, we can type Python code and see the results immediately. This section also displays the results of the code we write in script.py, which is primarily how we will use it throughout the course. Python has a built-in print function that allows us to display the results of code operations. To do this, we first write the word print with an opening and closing bracket after it. Next up, we put the message we want to be displayed within the brackets inside a set of double quotes and then hit the "Run code" button. We will then see the result of our code operation displayed inside the Shell. The print function is the only way to show the output for code that we write from within our script.py script. Now, it is your turn to use the print function to display things in Python.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.