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

Python Basics

Python is a high-level, interpreted programming language known for its simple syntax and applications in AI, ML, web development, automation, and data analysis. Key concepts include variables, data types, input/output, conditional statements, loops, lists, tuples, and dictionaries. An example program demonstrates basic syntax with print statements and variable assignments.

Uploaded by

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

Python Basics

Python is a high-level, interpreted programming language known for its simple syntax and applications in AI, ML, web development, automation, and data analysis. Key concepts include variables, data types, input/output, conditional statements, loops, lists, tuples, and dictionaries. An example program demonstrates basic syntax with print statements and variable assignments.

Uploaded by

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

Python Basics (Short Notes)

1. What is Python
 High-level, interpreted programming language
 Simple syntax and widely used for AI, ML, web, automation, and data
analysis
2. Python Program Example
print("Hello World")
3. Variables
Used to store values.
x = 10
name = "Paritosh"
pi = 3.14
4. Data Types
 int → 10
 float → 3.14
 str → "Hello"
 bool → True / False
Example:
a=5
b = 2.5
c = "Python"
5. Input and Output
name = input("Enter your name: ")
print(name)
6. Conditional Statements
x = 10
if x > 5:
print("Greater than 5")
else:
print("Less or equal to 5")
7. Loops
For Loop
for i in range(5):
print(i)
While Loop
i=0
while i < 5:
print(i)
i += 1
8. Lists
numbers = [1,2,3,4]
print(numbers[0])
9. Tuples
t = (10,20,30)
10. Dictionaries
student = {"name":"Ram", "age":20}
print(student["name"])

You might also like