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

Class 9 Python Revision Notes

This document provides an introduction to Python, highlighting its creation, characteristics, and execution methods. It covers important functions, data types, variable rules, operators, common errors, and the use of comments in Python programming. Overall, it serves as a foundational guide for beginners learning Python.
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)
2 views2 pages

Class 9 Python Revision Notes

This document provides an introduction to Python, highlighting its creation, characteristics, and execution methods. It covers important functions, data types, variable rules, operators, common errors, and the use of comments in Python programming. Overall, it serves as a foundational guide for beginners learning Python.
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

Class 9 - Introduction to Python

About Python

• Python was created by Guido van Rossum in 1991.


• Python is a high-level programming language.
• It is interpreted and platform-independent.
• It supports Object Oriented Programming.

Python File & Execution

• File extension of Python: .py


• Executed by Python Interpreter.
• Two modes: Interactive Mode and Script Mode.

Important Functions

• print() → Display output


• input() → Take user input (returns string)
• type() → Check data type

Data Types

• int → Whole numbers


• float → Decimal numbers
• string → Text inside single or double quotes
• boolean → True / False

Variables Rules

• A variable is a name given to a memory location.


• Cannot start with a number.
• Variable names are case sensitive.

Operators
• + → Addition and Concatenation
• // → Floor Division (removes decimal part)
• = → Assignment Operator

Errors in Python

• Syntax Error → Grammar mistake.


• Runtime Error → Error during execution.

Comments

• Written using # symbol.


• Ignored by interpreter.
• Improve readability of code.

You might also like