Lesson 1: Introduction to Python Programming

Welcome, dear reader, to the wondrous world of Python. Named not after the serpent but the comedy troupe, Python is a versatile and elegant language that lends itself to both computational tasks and scientific endeavors.

Why Python?

Google Colab: Your Python Playground

We shall embark on this journey using Google Colab, a free platform that provides a Python environment. Here, you can write and run Python code without any setup on your own machine.

Objective of this Lesson

The aim of this inaugural lesson is to familiarize you with Python’s basic syntax and commands. By the end, you should be able to write simple Python programs.

Basic Python Syntax


print("Hello, world!")


Practice Exercises

  1. Write a program that prints your name.
    Solution
    
          print("Your Name")
          
  2. Write a program that adds two numbers.
    Solution
    
          print(5 + 7)
          
  3. Write a program that calculates the area of a circle.
    Solution
    
          import math
          radius = 5
          area = math.pi * radius ** 2
          print(area)
          

Upcoming Lessons

Leave a Reply