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

Rating
-
Sold
-
Pages
7
Uploaded on
20-02-2026
Written in
2025/2026

Python Introduction – Python is an easy programming language used to communicate with computers. Features of Python – Python is simple, readable, and works on many platforms. Applications of Python – Python is used for websites, AI, data analysis, games, and automation. Print Statement – print() is used to display output on the screen. Comments – Comments are notes in code that Python ignores. Variables – Variables are containers used to store data values. Naming Rules for Variables – Variable names must follow rules like starting with a letter and having no special symbols. Data Types – Data types define the kind of value stored, like int, float, string, or boolean. Type Conversion – Type conversion changes one data type into another. Input from User – input() is used to take data from the user. Output Formatting – Output formatting helps display results in a clear and readable way. Arithmetic Operators – Arithmetic operators perform mathematical operations like addition and subtraction. Comparison Operators – Comparison operators compare two values and return True or False. Logical Operators – Logical operators combine multiple conditions. Assignment Operators – Assignment operators assign or update variable values. If Statement – If statement checks a condition and runs code if it is true. If–Else Statement – If–else runs one block if true and another if false. If–Elif–Else Ladder – It checks multiple conditions one by one. Nested If – Nested if is an if statement inside another if statement. For Loop – For loop repeats code a fixed number of times. While Loop – While loop repeats code as long as a condition is true. Nested Loops – Nested loops are loops placed inside another loop. Break Statement – Break stops a loop immediately. Continue Statement – Continue skips the current loop iteration. Pass Statement – Pass is a placeholder that does nothing. Strings – Strings are text values written inside quotes. String Indexing – String indexing accesses characters using position numbers. String Slicing – String slicing extracts part of a string. String Methods – String methods are built-in functions used to modify strings. Lists – Lists are ordered and changeable collections of items. List Indexing – List indexing accesses items using position numbers. List Slicing – List slicing extracts a portion of a list. List Methods – List methods are built-in functions like append and remove. Tuples – Tuples are ordered collections that cannot be changed. Tuple Characteristics – Tuples are immutable and use parentheses. Sets – Sets are unordered collections of unique values. Set Operations – Set operations perform union, intersection, and difference. Dictionaries – Dictionaries store data in key–value pairs. Dictionary Methods – Dictionary methods help access and modify key–value data. Functions – Functions are reusable blocks of code. Function Parameters and Arguments – Parameters receive values and arguments pass values to functions. Return Statement – Return sends a value back from a function. Scope of Variables – Scope defines where a variable can be used. Lambda Functions – Lambda functions are small one-line anonymous functions. Exception Handling – Exception handling prevents program crashes due to errors. Modules – Modules are files containing reusable Python code. Import Statement – Import is used to include a module in a program. Built-in Modules – Built-in modules like math and random provide ready-made functions. File Handling – File handling is used to read, write, or modify files. Object-Oriented Programming Basics – OOP is a way of programming using classes and objects. Class – A class is a blueprint for creating objects. Object – An object is an instance of a class. Constructor (init) – A constructor initializes object values when it is created. Instance Variables – Instance variables store data specific to an object. Methods – Methods are functions defined inside a class.

Show more Read less
Institution
Course

Content preview

Basis of phython

1. What is Python?
Python is a programming language.
Programming language = A way to talk to the computer.


🗣️
Just like:

💻
We talk in English
Computer understands Python

Python is used in:
Websites (like Instagram)
Search engines (like Google)
Movies & streaming (like Netflix)
AI, apps, games, automation

Why Python is popular?
✔ Easy to read
✔ Looks like English
✔ Less complicated

2. Print Statement (Showing Output)
If you want the computer to show something:
Copy code
Python

🎤
print("Hello World")
Real-life example: Think of print() like speaking through a mic
Whatever you write inside → comes to screen.
You can print numbers also:
Python
print(10)
print(5 + 3)

3. Variables (Storage Box Concept)

💧
Variable = A box to store value.
Real-life example: You have a container labelled "water"
Inside you store water.
Same in Python:

Python
name = "Velvet"
age = 18
Here:
name is box
"Velvet" is value inside box

, Important: No need to tell type separately. Python understands automatically.

4. Data Types (Types of Information)
Different kinds of data exist.
1️⃣ Integer (int)
Whole numbers.

Python
x = 10

2️⃣ Float
Decimal numbers.
Python
pi = 3.14

3️⃣ String (str)
Text inside quotes.
Python
name = "Velvet"

4️⃣ Boolean (bool)
True or False.
Python
is_student = True
Real-life example:
Age → int
Temperature → float
Name → string
Passed or not → boolean

5. Taking Input from User
If you want user to type something:
Copy code
Python
name = input("Enter your name: ")
print("Hello", name)
Important: Input always comes as string.
If number needed:

Python
age = int(input("Enter age: "))
Real-life example: ATM machine asking PIN → that’s input.

6. Operators (Doing Work)
Operators = Symbols that perform action.
Arithmetic Operators
Copy code
Python

Written for

Institution
Secondary school
Course
School year
1

Document information

Uploaded on
February 20, 2026
Number of pages
7
Written in
2025/2026
Type
Class notes
Professor(s)
Suguna
Contains
All classes

Subjects

$7.99
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
nekasakthivel

Get to know the seller

Seller avatar
nekasakthivel
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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