0% found this document useful (0 votes)
88 views19 pages

Python For Non-Programmers - 1-1

This document provides an overview of installing Python, PyCharm, Anaconda, and introduces Jupyter Notebook. It discusses variables in Python and how data is stored in variables. It also covers data types in Python like integers, floats, Booleans, and strings. Finally, it summarizes Python tokens including keywords, identifiers, literals, operators and examples of strings and string functions.

Uploaded by

Vinay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
88 views19 pages

Python For Non-Programmers - 1-1

This document provides an overview of installing Python, PyCharm, Anaconda, and introduces Jupyter Notebook. It discusses variables in Python and how data is stored in variables. It also covers data types in Python like integers, floats, Booleans, and strings. Finally, it summarizes Python tokens including keywords, identifiers, literals, operators and examples of strings and string functions.

Uploaded by

Vinay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 19

Python for Non-Programmers

Installing Python

This is the site to install Python -> https://www.python.org/downloads/


Installing PyCharm

This is the site to install PyCharm -> https://www.jetbrains.com/pycharm/


Installing Anaconda

This is the site to install Anaconda -> https://www.anaconda.com/


Intro to Jupyter Notebook

Jupyter Notebook is a browser-based interpreter that allows us to interactively


work with Python
Variables in Python

How do I
store data?

“John”

“Sam”

“Matt”
Variables in Python

Data/Values can be stored in temporary storage spaces called variables

Student

“John”

0x1098ab
Variables in Python

Data/Values can be stored in temporary storage spaces called variables

“John” “Sam” “Matt”


DataTypes in Python

Every variable is associated with a data-type

10, 500 3.14, 15.97 TRUE, FALSE “Sam”, “Matt”

int float Boolean String


Operators in Python

Arithmetic Operators

Relational Operators Logical Operators


Python Tokens

Smallest meaningful Component in a Program

Keywords

Identifiers

Literals

Operators
Python Keywords

Keywords are special reserved words

False class Finally Is Return

None continue For Lambda Try

True def From Nonlocal While

and del Global Not With

as elif If Or Yield
Python Identifiers

Identifiers are names used for variables, functions or objects

Rules

No special character expect _(underscore)

Identifiers are case sensitive

First Letter cannot be a digit


Python Literals

Literals are constants in Python

I’m a constant.
I don’t change
Python Strings

Strings are sequence of characters enclosed within single quotes(‘ ’), double
quotes(“ “) or triple quotes(‘’’ ‘’’)

‘’’ I am going to
‘Hello World’ “This is Sparta”
France tomorrow’’’
Extracting Individual Characters
String Functions

Finding length of string Converting String to lower case Converting String to upper case
String Functions

Replacing a substring

Number of occurrences of substring


String Functions

Finding the index of substring

Splitting a String

You might also like