0% found this document useful (0 votes)
17 views4 pages

Udemy Python Notes

The document provides a guide on installing Python packages and includes instructions for printing in Python, using print modifiers, and handling input. It explains object-oriented programming (OOP) concepts with real-world examples, such as modeling a restaurant with classes and objects. Additionally, it mentions the Python Package Index (PyPI) as a repository for Python software.

Uploaded by

Anupoorani_Shiva
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)
17 views4 pages

Udemy Python Notes

The document provides a guide on installing Python packages and includes instructions for printing in Python, using print modifiers, and handling input. It explains object-oriented programming (OOP) concepts with real-world examples, such as modeling a restaurant with classes and objects. Additionally, it mentions the Python Package Index (PyPI) as a repository for Python software.

Uploaded by

Anupoorani_Shiva
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

Installing packages in python

Refer : [Link]

Copy python path by clicking python and open file location


Copy the location in target: C:\Users\annap\AppData\Local\Programs\Python\Python312\
[Link]

Open command prompt as a administrator

Print() - Printing in python

Print(“Hello”)

Print Modifiers
print("A 'single quote' inside a double quote")

eg: print(“She said: ‘Hello‘ and then left.”)

print('A double quote" inside a single quote')

eg: print('She said: “Hello“and then left.')

print("Alternatively you can just \"escape\" the quote")

print("She said: \"Hello\" and then left.")

\n – for new line

print("Hello world\nHello world")

syntax error: suppose if we are missing any “ or ‘ quotaions

indentation error: will occur when spacing is given wrongly

input() – get input from user

Commenting a line of code use # (ctrl+/)

OOP - in real world application, we are trying to model real world applications into models.
modules and each has its own attributes(variables) and methods(functions)

Restaurant have models called chef, waiter, manager etc. waiter module have attributes called
is_holding_plate, responsible_table_num and methods called def take_order() and def
payment_collection() etc.

Blueprints (classes )are used to create objects.

Create an object syntax

Car=CarBluePrint()
Pypi=python package index is a repository of software for python programming

You might also like