0% found this document useful (0 votes)
3 views2 pages

Python Programming Basics Guide

Uploaded by

kingmakerssm061
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Programming Basics Guide

Uploaded by

kingmakerssm061
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

# Python Notes

## 1. Introduction

Python is a high-level, interpreted, object-oriented programming language.

## 2. Basic Syntax

print("Hello, Python!")

## 3. Variables & Data Types

age = 20

price = 99.5

name = "Prakash"

is_ok = True

## 4. Input

name = input("Enter your name: ")

## 5. Operators

Arithmetic: + - * / % // **

Comparison: == != > < >= <=

Logical: and or not

## 6. Conditional Statements

if num > 0:

print("Positive")

## 7. Loops

for i in range(5):

print(i)
## 8. Functions

def add(a, b):

return a + b

## 9. Lists

fruits = ["apple", "banana", "mango"]

## 10. Tuples

point = (10, 20, 30)

## 11. Dictionaries

student = {"name": "Aman", "age": 20}

## 12. File Handling

file = open("[Link]", "w")

## 13. OOP

class Car:

def __init__(self, brand, color):

[Link] = brand

[Link] = color

You might also like