0% found this document useful (0 votes)
9 views

Python 01 - Introduction & Syntax

Uploaded by

Darshan Khajbage
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Python 01 - Introduction & Syntax

Uploaded by

Darshan Khajbage
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Python

Chapter - 1: Introduction & Syntax


Introduction

What is Python? Why Python? Usage Of Python

2
Features Of Python
Interactive
Object-Oriented
◇ Write and execute code line by
◇ Supports OOPs
line
◇ Creation of reusable and modular
◇ You can see immediate results
code
◇ Helpful for testing and
◇ Smaller, more manageable
debugging
components
◇ Ǫuickly identify and fix any
◇ development process more efficient
issues
and organized

Platform Independent
Interpreted
◇ Write and execute code line by line ◇ Write and execute code line
◇ You can see immediate results by line
◇ Helpful for testing and debugging ◇ You can see immediate results
◇ Ǫuickly identify and fix any issues ◇ Helpful for testing and
debugging
◇ Ǫuickly identify and fix any
issues
3
Python Building Blocks
Identifiers
◇ Names used to identify variables, functions, classes, modules, or
other objects

Keywords
◇ Reserved words that have special meanings and cannot be used
as identifiers

Indentation
◇ Used to define code blocks and is typically done using spaces
or tabs.

Variables
◇ Used to store values in Python. Use =.
Comments
◇ Used to add explanatory notes or documentation.
4
IDE Setup

VS Code IDE
◇ Install Python Interpreter Online IDE
◇ Install Visual Studio Code ◇ Go To https://w w w.online-python.com/
◇ Install Python Extension ◇ Write Your Code
◇ Write Your Code ◇ Save the Program
◇ Save the Program ◇ Click on Run!!
◇ Click on Run!!

5
Python Interpreter
Download Latest Version of Python from https://www.python.org/downloads/

6
Python Installation
Select Add to Path option and Click Install now.

7
VS Code Download
Download Latest Version of Visual Studio Code from https://code.visualstudio.com/download.

8
VS Code Install
Install Visual Studio Code

9
Extension Install
Search Python Extension and click Install

10
Write First Program
◇ Select File in menu bar
◇ Click New File
◇ Write Your Code in the editor
◇ Save the Program
◇ Click on Run!!

This is a simple Python script to display a welcome message


print("Welcome to Python. I am Nikhil!")

11
Assignment
Hey space explorer! You just landed on Mars and built your own Martian home
(woohoo!). But being the only human on a rusty planet is kinda lonely To make
things friendlier, you build a robot buddy who wakes you up with a happy
greeting. The problem is, you haven't talked to computers much lately (maybe
just the rocket?). So can you write a simple code trick for your robot to say
"Good morning!" and your name, like a real friend would? Make it short and

?
sweet, like robot talk with no confusing words.
Thanks!
Any questions?

13

You might also like