Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Python notes

Rating
-
Sold
-
Pages
12
Uploaded on
05-09-2024
Written in
2024/2025

Detailed notes of python

Institution
Course

Content preview

UNIT 1

BASICS OF PYTHON

1. 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.

What can Python do?

 Python can be used on a server to create web applications.
 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software
development.

Why Python is used

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines
than some other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as
soon as it is written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-oriented way or a
functional way.

2. VARIABLES
 A Python variable is a reserved memory location to store values. In other words,
a variable in a python program gives data to the computer for processing.
 Every value in Python has a datatype. Different data types in Python are
Numbers,List, Tuple, Strings, Dictionary, etc. Variables can be declared by any
name or evenalphabets like a, aa, abc, etc

Variable Naming Rules in Python

 Variable name should start with letter(a-zA-Z) or underscore (_).
 In variable name, no special characters allowed other than underscore (_).
 Variables are case sensitive.
 Variable name can have numbers but not at the beginning.
 Variable name should not be a Python keyword.Keywords are also called as
reserved words.

, How to Declare and use a Variable

Declare variable "a" and print it.

a=100

print (a)

Re-declare a Variable

a=100

print(a)

a=’AECS Jaduguda’

print(a)

Concatenate Variables

a='AECS'

b=1

print(a+b)

will throw error , as we cannot concatenate two different datatypes.

a='AECS'

b=1

print(a+str(b))

will display

AECS1

Delete a variable

 You can also delete variable using the command del "variable name".
 The below table displays the list of available assignment operators in Python
language.



3. EXECUTING PYTHON FROM COMMAND LINE

Methods to Run a Script in Python

There are various methods to Run a Python script, we will go through some generally
used methods for running a Python script:

 Interactive Mode
 Command Line
 Text Editor (VS Code)

Written for

Institution
Course

Document information

Uploaded on
September 5, 2024
Number of pages
12
Written in
2024/2025
Type
Class notes
Professor(s)
Sathya
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sathyaoffici

Get to know the seller

Seller avatar
sathyaoffici Madonna matriculation school
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
16
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions