Python Programming for Complete Beginners: A Structured Course

Lesson 1: Introduction to Python

Objective: Write and run your first Python program.

  • What is Python?

  • Installing Python & IDLE/VS Code.

  • Write and Run your first Python code online.

  • print(), variables (x = 5), basic math.

What is Python?

Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for:

  • web development (server-side),
  • software development,
  • mathematics,
  • system scripting.

 

Python Install

You can download it for free from the following website: https://www.python.org/

Run Code: Write and Run your first Python code at  Python Playground.

Code Example:

print(“Hello, World!”)
print(“My name is ‘Your name here.'”)
 

 

Code Example 2:

print(“Hello, World!”)

x = “Python”
y = “is”
z = “awesome”
print(x, y, z)

Run Code: You can also Run your Python code at  Online Python.

Ask for user input:

a = int(input(‘Enter 1st number: ‘))
b = int(input(‘Enter 2nd number: ‘))

print(f’Sum of {a} and {b} is {a + b}’)

 

Exercise:

  • Write a program that asks for a user’s name and age, then prints them.