Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

Class 9 AI Notes Python

Python is a high-level, general-purpose programming language known for its readability and simplicity. It supports both object-oriented and procedural programming, has a vast array of libraries, and is widely used in fields like data science and machine learning. Key features include easy learning, a large standard library, and a strong community support.

Uploaded by

roy1862010
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Class 9 AI Notes Python

Python is a high-level, general-purpose programming language known for its readability and simplicity. It supports both object-oriented and procedural programming, has a vast array of libraries, and is widely used in fields like data science and machine learning. Key features include easy learning, a large standard library, and a strong community support.

Uploaded by

roy1862010
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

What is Python language?

Python is a widely used high-level, general-purpose, interpreted, dynamic


programming language. Its design philosophy emphasizes code readability, and
its syntax allows programmers to express concepts in fewer lines of code than
possible in languages such as C++ or Java.

Why to use Python ?


Why is Python so popular?
hide

1. Easy to Learn, Read and Maintain – Highly Productive


2. Supports both Object and Procedure Oriented Programming
3. 100ds of Libraries and Frameworks
4. Flexibility of Python Language
5. Big data, Machine Learning and Cloud Computing
6. Versatility, Efficiency, Reliability, and Speed
7. Databases and Scalable
What are Comments?

Comments are the piece of code that is generally ignored by the Interpreter, it helps the
programmer to keep track of the code, organize it properly, and Maintain the code collectively in
a team

What are Variables ?

Variables in Programming act like containers that can store different types of data or any data
value in them, a variable in a python program gives data to the computer for processing.
How to Create Variables in Python?

In python, a variable can be created by just naming it and assigning some value to it, a variable is
created the moment you first assign a value to it.

Creating a variable in python

x = "Your Name"
print(x)

# This is a string (Data Type) .

What is a Datatype ?

In previous lessons, we stored data in variables. There, some text was in quotes and some were
not in quotes. As computer don’t know how to put something under a type of data.
For example, if you write text and number then You should tell the computer which one is text
and which integer

Data Types in Python

MyVar1 = "Some Text" # This is a text or String


print(MyVar1)

MyVar2 = 12 # This is an integer


print(MyVar2)
O

YoDifferent Data Types in Python

Data
To Change Denoted by
Type

String str() ”“
Integer int() None

Float float() None

Lists list() [“a”,”b”]

Tuples tuple() (“a”,”b”)

dict(name =
Dictionary “somename”,work {“a”:”b”,”c”:”d”}
=”somework”)

Boolean bool(1) True / False

Sets set((“a”,”b”)) {“a”,”b”,”c

What is PIP?
PIP is a package manager for Python packages, or modules if you like.

Note: If you have Python version 3.4

Jupyter Notebook is a free, open-source web application that allows users to


create and share documents that include live code, equations, and other
multimedia resources. It's a popular tool for data scientists, computational
journalists, and others working in scientific computing and machine learning.

• Error! Filename not specified.


• Error! Filename not specified.
• Error! Filename not specified.

Here are some features of Jupyter Notebook:

• Error! Filename not specified.

• Multiple programming languages: Supports over 40 programming languages,


including Python, R, Julia, and Scala

o Error! Filename not specified.


• Flexible interface: Users can configure and arrange workflows

o Error! Filename not specified.


• Sharing: Notebooks can be shared with others using email, Dropbox, GitHub, and
the Jupyter Notebook Viewer

o Error! Filename not specified.


• Rich text: Users can color text and embed logos

o Error! Filename not specified.


• Visualization: Users can embed visualizations in their notebooks

o Error! Filename not specified.


• Keyboard shortcuts: Cells have different colored borders to indicate their current
mode

Python is a programming language with many features, including:

• Error! Filename not specified.


• Error! Filename not specified.

• Easy to learn: Python is easy to read and has a simple syntax. It's often written
using English keywords instead of punctuation, and doesn't use curly brackets to
delimit blocks.
o Error! Filename not specified.
o Error! Filename not specified.
• Open source: Python is free and open source.

o Error! Filename not specified.


• Object-oriented: Python supports object-oriented programming (OOP), which is
based on the concept of objects that contain data and code.

o Error! Filename not specified.


o Error! Filename not specified.
• Portable: Python is highly portable and platform independent.

o Error! Filename not specified.


o Error! Filename not specified.
• Large standard library: Python comes with a comprehensive standard library.

o Error! Filename not specified.


• Easy to debug: Python is high-level and easy to debug.

o
• Supports multiple paradigms: Python supports multiple programming
paradigms.

oError! Filename not specified.


• Community support: Python has a large community of supporters.

o Error! Filename not specified.


• Versatile: Python is versatile and can be used for many purposes, including
machine learning.

o Error! Filename not specified.


o Error! Filename not specified.
• Interpreted: Python is an interpreted language.

o Error! Filename not specified.


• GUI support: Python supports GUI programming.
LIST
A list is a data structure in Python that is a mutable, or changeable, ordered sequence
of elements. Each element or value that is inside of a list is called an item. Just
as strings are defined as characters between quotes, lists are defined by having values
between square brackets [ ].

What is input statement in python

The input functionIn Python, we request user input using the input()
function. Syntax message = input("This is where you type in your input
request: ") This set of code is requesting for user input, and will store it
in the message variable.
What is print statement in python
In Python, the print() function is used to print the desired message on
a device's screen.
What is python IDLE ?
Python IDLE (Integrated Development and Learning Environment) is an
integrated development environment for Python that comes bundled
with the standard Python distribution. It serves as a convenient tool
for writing, testing, and debugging Python code.

You might also like