Introduction

Welcome to our first lesson of the Python introductory course! Today, we will uncover the simplicity and power of Python, a universally esteemed programming language renowned for its expressiveness and readability. We'll learn and practice in the CodeSignal environment, where the Python libraries are pre-installed. By the end of this lesson, you'll grasp the foundational aspects of Python and be able to execute your very first Python code. Intriguing, isn't it?

Understanding Python Syntax

Every language, whether it's English, Spanish, or Python, operates under a unique syntax. This cohesive framework consists of rules and principles that delineate what is grammatically correct. Similarly, Python's syntax describes how Python programs should be composed and structured.

Let's start with something simple! Statements are instructions that a Python interpreter can execute. For example:

In this statement, print() is a function that Python provides to print the provided input to the console, and "Hello, and welcome to the Python World!" is a string that is printed on the console.

Explaining Comments in Python

Coding is a form of art, and akin to every artist, coders leave reflections and significant explanations in their code in the form of comments. Comments are annotations or explanations providing additional insights about the code. They make your code more informative and demonstrative to others (or even to your future self). Comments do not affect your code execution or its outcome in any way but are helpful to better understand what's happening in the code.

Python features two types of comments: single-line and multi-line. Here is what they look like:

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal