The document provides an introduction and overview of the Python programming language. It discusses that Python is an interpreted, object-oriented, high-level programming language that is easy to learn and read. It also covers Python features such as portability, extensive standard libraries, and support for functional, structured, and object-oriented programming. The document then discusses Python data types including numbers, strings, and various Python syntax elements before concluding with the history and evolution of the Python language through various versions.
Python is an interpreted, object-oriented programming language created by Guido van Rossum in 1990. It has a clear, readable syntax and is designed to be highly extensible. Python code is often much shorter than equivalent code in other languages like C++ or Java due to features like indentation-based blocks and dynamic typing. It is used for web development, scientific computing, and more.
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum who named it after the Monty Python comedy troupe. People use Python for a variety of tasks due to its readability, object-oriented capabilities, extensive libraries, and ability to integrate with other languages. To run Python code, it must first be compiled into bytecode which is then interpreted by the Python virtual machine.
This document provides an introduction to the Python programming language. It covers Python's history and features, including its syntax, types, operators, control flow, functions, classes, and tools. Python is a readable, dynamic language suitable for web development, GUIs, scripting, and more. It has a focus on readability and productivity. Major companies and organizations that use Python include Google, NASA, Dropbox, IBM, Instagram, and Mozilla.
C++ is an object-oriented programming language that was created as an extension of C programming language. It was created by Bjarne Stroustrup in 1979 at Bell Labs. Some key differences between C and C++ include C++ supporting object-oriented programming concepts like classes, inheritance and polymorphism, while C is a procedural language. Pointers and references are commonly used in C++ to pass arguments to functions by reference rather than by value. Arrays and functions are also important elements of C++ programs.
This document discusses an introduction to Python training provided by DataFlair. It covers what Python is as an interpreted, high-level and general-purpose programming language. It discusses the history of Python from its conception in 1980 to the end of life for Python 2.7 in 2020. It also outlines some of Python's key features and components like functions, modules, packages and classes. Finally, it discusses frameworks and flavors of Python like Django, Flask and Jython as well as uses of Python for tasks like website building, data analysis and machine learning.
This document provides an overview of the Python programming language. It begins by explaining what Python is - a general purpose, interpreted programming language that can be used as both a programming and scripting language. It then discusses the differences between programs and scripting languages. The history and creator of Python, Guido van Rossum, are outlined. The document explores the scope of Python and what tasks it can be used for. Popular companies and industries that use Python today are listed. Reasons why people use Python, such as it being free, powerful, and portable, are provided. Instructions for installing Python and running Python code are included. The document covers Python code execution and introduces basic Python concepts like variables, strings, data types, lists
The document discusses strings in Python. It describes that strings are immutable sequences of characters that can contain letters, numbers and special characters. It covers built-in string functions like len(), max(), min() for getting the length, maximum and minimum character. It also discusses string slicing, concatenation, formatting, comparison and various string methods for operations like conversion, formatting, searching and stripping whitespace.
The document discusses various concepts related to functions in Python including defining functions, passing arguments, default arguments, arbitrary argument lists, lambda expressions, function annotations, and documentation strings. Functions provide modularity and code reusability. Arguments can be passed by value or reference and default values are evaluated once. Keyword, arbitrary and unpacked arguments allow flexible calling. Lambda expressions define small anonymous functions. Annotations provide type metadata and docstrings document functions.
This document provides an overview of the Python programming language and its applications. It begins by defining Python as a clear and powerful object-oriented language. It then lists some of Python's key features, such as its elegant syntax, large standard library, ability to run on multiple platforms, and being free and open source. The document provides a simple "Hello World" example in Python. It also compares short code samples in Python, C++ and Java. The remainder of the document discusses some common applications of Python, including web development, science/engineering, robotics, GUI development, data science, machine learning, computer vision and more. It provides examples of using Python for tasks like web crawling, games development, file management and automation
Python is a versatile, object-oriented programming language that can be used for web development, data analysis, and more. It has a simple syntax and is easy to read and learn. Key features include being interpreted, dynamically typed, supporting functional and object-oriented programming. Common data types include numbers, strings, lists, dictionaries, tuples, and files. Functions and classes can be defined to organize and reuse code. Regular expressions provide powerful string manipulation. Python has a large standard library and is used widely in areas like GUIs, web scripting, AI, and scientific computing.
The document discusses Python data types. It describes the numeric data types integer, float, and complex which are used to represent numbers. Integer is a whole number without decimals, float has decimals, and complex numbers have real and imaginary parts. None is described as a null value. Strings are arrays of characters and can be indexed. Tuples and lists are ordered collections that can hold heterogeneous data types. Sets are unordered collections of unique items. Dictionaries are unordered collections of key-value pairs that allow accessing values via keys.
The document discusses various Python datatypes. It explains that Python supports built-in and user-defined datatypes. The main built-in datatypes are None, numeric, sequence, set and mapping types. Numeric types include int, float and complex. Common sequence types are str, bytes, list, tuple and range. Sets can be created using set and frozenset datatypes. Mapping types represent a group of key-value pairs like dictionaries.
The document discusses file handling in Python. It explains that a file is used to permanently store data in non-volatile memory. It describes opening, reading, writing, and closing files. It discusses opening files in different modes like read, write, append. It also explains attributes of file objects like name, closed, and mode. The document also covers reading and writing text and binary files, pickle module for serialization, and working with CSV files and the os.path module.
This document provides an introduction and overview of the Python programming language. It covers Python's history and key features such as being object-oriented, dynamically typed, batteries included, and focusing on readability. It also discusses Python's syntax, types, operators, control flow, functions, classes, imports, error handling, documentation tools, and popular frameworks/IDEs. The document is intended to give readers a high-level understanding of Python.
A class is a code template for creating objects. Objects have member variables and have behaviour associated with them. In python a class is created by the keyword class.
An object is created using the constructor of the class. This object will then be called the instance of the class.
NumPy is a Python library that provides multidimensional array and matrix objects to perform scientific computing. It contains efficient functions for operations on arrays like arithmetic, aggregation, copying, indexing, slicing, and reshaping. NumPy arrays have advantages over native Python sequences like fixed size and efficient mathematical operations. Common NumPy operations include elementwise arithmetic, aggregation functions, copying and transposing arrays, changing array shapes, and indexing/slicing arrays.
This presentation deals with pure object oriented concepts and defines basic principles of OOP's like Encapsulation , polymorphism , Inheritance and Abstraction.
Modules in Python allow organizing classes into files to make them available and easy to find. Modules are simply Python files that can import classes from other modules in the same folder. Packages allow further organizing modules into subfolders, with an __init__.py file making each subfolder a package. Modules can import classes from other modules or packages using either absolute or relative imports, and the __init__.py can simplify imports from its package. Modules can also contain global variables and classes to share resources across a program.
The document discusses Bram Cohen's view that Python is a good language for maintainability as it has clean syntax, object encapsulation, good library support, and optional parameters, and then provides details about the history and features of the Python programming language such as being dynamically typed, having a large standard library, and being cross-platform.
oops concept in java | object oriented programming in javaCPD INDIA
油
The document discusses key concepts in object-oriented programming in Java including classes, objects, inheritance, packages, interfaces, encapsulation, abstraction, and polymorphism. It provides examples to illustrate each concept. Classes define the structure and behavior of objects. Objects are instances of classes. Inheritance allows classes to extend existing classes. Packages organize related classes. Interfaces define behaviors without implementation. Encapsulation hides implementation details. Abstraction models essential features without specifics. Polymorphism allows the same method name with different signatures or overriding.
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
油
Introduction to Python:
The basic elements of Python, Objects, expressions and numerical Types, Variables and assignments, IDLE, Branching programs, Strings and Input, Iteration
Structured Types, Mutability and Higher-order Functions:
Tuples, Lists and Mutability, Functions as Objects, Strings, Tuples and Lists, Dictionaries
Python An Introduction, A presentation Developed by Swarit Wadhe. This 際際滷 Will Give you basic information about python (Origin, Codes and difference from other languages).
I hope you'll find this helpfull and if you do please share it with your fellows.
The document presents information about functions in the C programming language. It discusses what a C function is, the different types of C functions including library functions and user-defined functions. It provides examples of how to declare, define, call and pass arguments to C functions. Key points covered include how functions allow dividing a large program into smaller subprograms, the ability to call functions multiple times, and how functions improve readability, debugging and reusability of code. An example program demonstrates a simple C function that calculates the square of a number.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
After the end of lesson you will be able to learn Python basics-What Python is? Its releases. Where we can use Python? Python Features. Tokens, comments variables etc... In out next PPT you will learn how to input and get output in Python
Python is a general purpose programming language that can be used for web development, system administration, science and more. It is interpreted rather than compiled, and was created in the 1990s by Guido van Rossum to be highly readable. Python is widely used by companies like Google, YouTube, Intel and more due to its power, flexibility and readability. It supports key programming concepts like variables, conditionals, loops, lists, tuples and more.
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum. Python is an interpreted language that is free, powerful, and portable. It can be used for tasks like web development, data analysis, and system scripting. The document provides an overview of Python including its history, uses, data types like strings and lists, and basic programming concepts like variables, conditionals, and loops. It recommends Python as a principal teaching language due to its free and easy installation, flexibility, use in academia and industry, and ability to offer a more rapid and enjoyable learning experience for students.
The document discusses various concepts related to functions in Python including defining functions, passing arguments, default arguments, arbitrary argument lists, lambda expressions, function annotations, and documentation strings. Functions provide modularity and code reusability. Arguments can be passed by value or reference and default values are evaluated once. Keyword, arbitrary and unpacked arguments allow flexible calling. Lambda expressions define small anonymous functions. Annotations provide type metadata and docstrings document functions.
This document provides an overview of the Python programming language and its applications. It begins by defining Python as a clear and powerful object-oriented language. It then lists some of Python's key features, such as its elegant syntax, large standard library, ability to run on multiple platforms, and being free and open source. The document provides a simple "Hello World" example in Python. It also compares short code samples in Python, C++ and Java. The remainder of the document discusses some common applications of Python, including web development, science/engineering, robotics, GUI development, data science, machine learning, computer vision and more. It provides examples of using Python for tasks like web crawling, games development, file management and automation
Python is a versatile, object-oriented programming language that can be used for web development, data analysis, and more. It has a simple syntax and is easy to read and learn. Key features include being interpreted, dynamically typed, supporting functional and object-oriented programming. Common data types include numbers, strings, lists, dictionaries, tuples, and files. Functions and classes can be defined to organize and reuse code. Regular expressions provide powerful string manipulation. Python has a large standard library and is used widely in areas like GUIs, web scripting, AI, and scientific computing.
The document discusses Python data types. It describes the numeric data types integer, float, and complex which are used to represent numbers. Integer is a whole number without decimals, float has decimals, and complex numbers have real and imaginary parts. None is described as a null value. Strings are arrays of characters and can be indexed. Tuples and lists are ordered collections that can hold heterogeneous data types. Sets are unordered collections of unique items. Dictionaries are unordered collections of key-value pairs that allow accessing values via keys.
The document discusses various Python datatypes. It explains that Python supports built-in and user-defined datatypes. The main built-in datatypes are None, numeric, sequence, set and mapping types. Numeric types include int, float and complex. Common sequence types are str, bytes, list, tuple and range. Sets can be created using set and frozenset datatypes. Mapping types represent a group of key-value pairs like dictionaries.
The document discusses file handling in Python. It explains that a file is used to permanently store data in non-volatile memory. It describes opening, reading, writing, and closing files. It discusses opening files in different modes like read, write, append. It also explains attributes of file objects like name, closed, and mode. The document also covers reading and writing text and binary files, pickle module for serialization, and working with CSV files and the os.path module.
This document provides an introduction and overview of the Python programming language. It covers Python's history and key features such as being object-oriented, dynamically typed, batteries included, and focusing on readability. It also discusses Python's syntax, types, operators, control flow, functions, classes, imports, error handling, documentation tools, and popular frameworks/IDEs. The document is intended to give readers a high-level understanding of Python.
A class is a code template for creating objects. Objects have member variables and have behaviour associated with them. In python a class is created by the keyword class.
An object is created using the constructor of the class. This object will then be called the instance of the class.
NumPy is a Python library that provides multidimensional array and matrix objects to perform scientific computing. It contains efficient functions for operations on arrays like arithmetic, aggregation, copying, indexing, slicing, and reshaping. NumPy arrays have advantages over native Python sequences like fixed size and efficient mathematical operations. Common NumPy operations include elementwise arithmetic, aggregation functions, copying and transposing arrays, changing array shapes, and indexing/slicing arrays.
This presentation deals with pure object oriented concepts and defines basic principles of OOP's like Encapsulation , polymorphism , Inheritance and Abstraction.
Modules in Python allow organizing classes into files to make them available and easy to find. Modules are simply Python files that can import classes from other modules in the same folder. Packages allow further organizing modules into subfolders, with an __init__.py file making each subfolder a package. Modules can import classes from other modules or packages using either absolute or relative imports, and the __init__.py can simplify imports from its package. Modules can also contain global variables and classes to share resources across a program.
The document discusses Bram Cohen's view that Python is a good language for maintainability as it has clean syntax, object encapsulation, good library support, and optional parameters, and then provides details about the history and features of the Python programming language such as being dynamically typed, having a large standard library, and being cross-platform.
oops concept in java | object oriented programming in javaCPD INDIA
油
The document discusses key concepts in object-oriented programming in Java including classes, objects, inheritance, packages, interfaces, encapsulation, abstraction, and polymorphism. It provides examples to illustrate each concept. Classes define the structure and behavior of objects. Objects are instances of classes. Inheritance allows classes to extend existing classes. Packages organize related classes. Interfaces define behaviors without implementation. Encapsulation hides implementation details. Abstraction models essential features without specifics. Polymorphism allows the same method name with different signatures or overriding.
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
油
Introduction to Python:
The basic elements of Python, Objects, expressions and numerical Types, Variables and assignments, IDLE, Branching programs, Strings and Input, Iteration
Structured Types, Mutability and Higher-order Functions:
Tuples, Lists and Mutability, Functions as Objects, Strings, Tuples and Lists, Dictionaries
Python An Introduction, A presentation Developed by Swarit Wadhe. This 際際滷 Will Give you basic information about python (Origin, Codes and difference from other languages).
I hope you'll find this helpfull and if you do please share it with your fellows.
The document presents information about functions in the C programming language. It discusses what a C function is, the different types of C functions including library functions and user-defined functions. It provides examples of how to declare, define, call and pass arguments to C functions. Key points covered include how functions allow dividing a large program into smaller subprograms, the ability to call functions multiple times, and how functions improve readability, debugging and reusability of code. An example program demonstrates a simple C function that calculates the square of a number.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
After the end of lesson you will be able to learn Python basics-What Python is? Its releases. Where we can use Python? Python Features. Tokens, comments variables etc... In out next PPT you will learn how to input and get output in Python
Python is a general purpose programming language that can be used for web development, system administration, science and more. It is interpreted rather than compiled, and was created in the 1990s by Guido van Rossum to be highly readable. Python is widely used by companies like Google, YouTube, Intel and more due to its power, flexibility and readability. It supports key programming concepts like variables, conditionals, loops, lists, tuples and more.
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum. Python is an interpreted language that is free, powerful, and portable. It can be used for tasks like web development, data analysis, and system scripting. The document provides an overview of Python including its history, uses, data types like strings and lists, and basic programming concepts like variables, conditionals, and loops. It recommends Python as a principal teaching language due to its free and easy installation, flexibility, use in academia and industry, and ability to offer a more rapid and enjoyable learning experience for students.
This document discusses training on Python that was conducted over six weeks by Cetpa Infotech Pvt. Ltd. It covers topics like what Python is, the differences between programs and scripting languages, Python's history and uses. It also discusses installing Python IDEs and provides examples of Python code, variables, data types, strings, lists, tuples, and control flow statements. The conclusion is that Python is a good teaching language due to being free, easy to install, and flexible for both procedural and object-oriented programming.
Python is a popular programming language created by Guido van Rossum in 1991. It is easy to use, powerful, and versatile, making it suitable for beginners and experts alike. Python code can be written and executed in the browser using Google Colab, which provides a Jupyter notebook environment and access to computing resources like GPUs. The document then discusses installing Python using Anaconda, basic Python concepts like indentation, variables, strings, conditionals, and loops.
Interpreter v/s Compiler summarizes the key differences between interpreters and compilers. Interpreters translate programs one statement at a time with no object code generated, making them more memory efficient. Compilers scan entire programs and translate them into machine code at once, generating object code and requiring more memory but providing faster overall execution time. Popular languages like JavaScript, Python, and Ruby use interpreters while C, C++, and Java use compilers.
The document compares interpreters and compilers. It states that interpreters translate code line-by-line while compilers scan the entire program at once. Interpreters have faster analysis time but slower overall execution, while compilers have slower analysis but faster execution. Interpreters do not generate object code so are more memory efficient. Languages like JavaScript, Python and Ruby use interpreters, while C, C++ and Java use compilers.
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdfSana Khan
油
This document provides a summary of an audit course on Python taught by Prof. Kannan Moudgalya at IIT Bombay. It contains 6 chapters that cover topics like downloading and installing Python, data types and operators in Python, tuples and lists, loops and conditional statements, and the uses and scope of Python. The course was submitted by Sana Parveen to Moina Mam of the Department of Petroleum Studies at Aligarh Muslim University, Aligarh for the 2022-2023 academic year.
The document provides an introduction and overview of the Python programming language including:
- Its origins and timeline from 1989 to present.
- How it combines functional, imperative and object-oriented paradigms.
- Details on dynamic vs static typing and how Python interprets source code.
- Benefits of its interactive shell, readability, large standard library and thriving community.
- Common uses like scripting, web development, science/engineering tasks, and jobs that utilize Python skills.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum to address the need for a higher level language in the Amoeba operating system project. Python is widely used today for web development, science, system administration, and more due to its readability, object orientation, powerful libraries, and portability across operating systems. To use Python, one installs an IDE like Python 2.7 and then writes and runs code either in the Python command line or IDE.
SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL SAMCSCMLA SCACLSALS CS L LSLSL
Python is a widely used programming language that offers several unique features and advantages compared to languages like Java and C++. Our Python tutorial thoroughly explains Python basics and advanced concepts, starting with installation, conditional statements, loops, built-in data structures, Object-Oriented Programming, Generators, Exception Handling, Python RegEx, and many other concepts. This tutorial is designed for beginners and working professionals.
Python is a high-level programming language that emphasizes code readability. It has a clear syntax and large standard library. Python can be used for system programming, GUIs, internet scripting, database programming, and more. Some key strengths of Python include being object-oriented, free, portable, powerful, easy to use and learn. Popular uses of Python include web development, scientific computing, and financial applications. The document provides an overview of Python fundamentals like data types, control flow statements, functions, classes, and modules.
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfYadavHarshKr
油
The document discusses Python, including its history, design philosophy, and uses. It began in the late 1980s as a scripting language with emphasis on code readability. Python supports multiple programming paradigms like object-oriented and functional programming. It has a large standard library and interpreters available on many operating systems.
The type of a value refers to the kind of data it represents. In Python, the main types are:
- int - integer numbers like 1, 2, 100
- float - floating point numbers like 1.5, 3.14159
- str - strings, sequences of characters like 'hello'
- bool - boolean values True or False
When you write code, Python assigns a type to each value. The type determines how it can be used and what operations are valid on it. For example, you can add two integers but not add an integer to a string. Checking and understanding types is important for writing correct Python code.
Python tutorial for beginners - Tib academyTIB Academy
油
Get python training through simple tutorial from TIB Academy, through this python tutorial you can lean more topics of python. you can download python tutorial free as PPT
Air pollution is contamination of the indoor or outdoor environment by any ch...dhanashree78
油
Air pollution is contamination of the indoor or outdoor environment by any chemical, physical or biological agent that modifies the natural characteristics of the atmosphere.
Household combustion devices, motor vehicles, industrial facilities and forest fires are common sources of air pollution. Pollutants of major public health concern include particulate matter, carbon monoxide, ozone, nitrogen dioxide and sulfur dioxide. Outdoor and indoor air pollution cause respiratory and other diseases and are important sources of morbidity and mortality.
WHO data show that almost all of the global population (99%) breathe air that exceeds WHO guideline limits and contains high levels of pollutants, with low- and middle-income countries suffering from the highest exposures.
Air quality is closely linked to the earths climate and ecosystems globally. Many of the drivers of air pollution (i.e. combustion of fossil fuels) are also sources of greenhouse gas emissions. Policies to reduce air pollution, therefore, offer a win-win strategy for both climate and health, lowering the burden of disease attributable to air pollution, as well as contributing to the near- and long-term mitigation of climate change.
Lessons learned when managing MySQL in the CloudIgor Donchovski
油
Managing MySQL in the cloud introduces a new set of challenges compared to traditional on-premises setups, from ensuring optimal performance to handling unexpected outages. In this article, we delve into covering topics such as performance tuning, cost-effective scalability, and maintaining high availability. We also explore the importance of monitoring, automation, and best practices for disaster recovery to minimize downtime.
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2Daniel Donatelli
油
The cost in USD/kwh for H2
Daniel Donatelli
Secure Supplies Group
Index
Introduction - Page 3
The Need for Hydrogen Fueling - Page 5
Pure H2 Fueling Technology - Page 7
Blend Gas Fueling: A Transition Strategy - Page 10
Performance Metrics: H2 vs. Fossil Fuels - Page 12
Cost Analysis and Economic Viability - Page 15
Innovations Driving Leadership - Page 18
Laminar Flame Speed Adjustment
Heat Management Systems
The Donatelli Cycle
Non-Carnot Cycle Applications
Case Studies and Real-World Applications - Page 22
Conclusion: Secure Supplies Leadership in Hydrogen Fueling - Page 27
Lecture -3 Cold water supply system.pptxrabiaatif2
油
The presentation on Cold Water Supply explored the fundamental principles of water distribution in buildings. It covered sources of cold water, including municipal supply, wells, and rainwater harvesting. Key components such as storage tanks, pipes, valves, and pumps were discussed for efficient water delivery. Various distribution systems, including direct and indirect supply methods, were analyzed for residential and commercial applications. The presentation emphasized water quality, pressure regulation, and contamination prevention. Common issues like pipe corrosion, leaks, and pressure drops were addressed along with maintenance strategies. Diagrams and case studies illustrated system layouts and best practices for optimal performance.
Engineering at Lovely Professional University (LPU).pdfSona
油
LPUs engineering programs provide students with the skills and knowledge to excel in the rapidly evolving tech industry, ensuring a bright and successful future. With world-class infrastructure, top-tier placements, and global exposure, LPU stands as a premier destination for aspiring engineers.
2. What We Give you?
What is Python?
Differences between program and scripting language
History of Python
Scope of Python
What can I do with python
Who uses python today
Why do people use Python?
Installing Python IDE
A Sample Code
Python code execution
Running Python
Python Basic(Variable, Strings, Data types etc.)
2
3. What is Python?
Python is a general purpose programming language that is
often applied in scripting roles.
So, Python is programming language as well as scripting
language.
Python is also called as Interpreted language
3
4. Differences between program and
scripting language
Program Scripting
a program is executed (i.e.
the source is first compiled,
and the result of that
compilation is expected)
A "program" in general, is a
sequence of instructions
written so that a computer
can perform certain task.
a script is interpreted
A "script" is code written in
a scripting language. A
scripting language is nothing
but a type of programming
language in which we can
write code to control
another software application.
4
5. History
Invented in the Netherlands, early 90s by Guido van
Rossum
Python was conceived in the late 1980s and its
implementation was started in December 1989
Guido Van Rossum is fan of Monty Pythons Flying
Circus, this is a famous TV show in Netherlands
Named after Monty Python
Open sourced from the beginning
5
6. Pythons Benevolent Dictator For Life
Python is an experiment in how
much freedom programmers need.
Too much freedom and nobody can
read another's code; too little and
expressiveness is endangered.
- Guido van Rossum
6
7. Why was python created?
"My original motivation for creating Python was the
perceived need for a higher level language in the
Amoeba [Operating Systems] project.
I realized that the development of system
administration utilities in C was taking too long.
Moreover, doing these things in the Bourne shell
wouldn't work for a variety of reasons. ...
So, there was a need for a language that
would bridge the gap between C and the shell
- Guido Van Rossum
7
8. Scope of Python
Science
- Bioinformatics
System Administration
-Unix
-Web logic
-Web sphere
Web Application Development
-CGI
-Jython Servlets
Testing scripts
8
9. What can I do with Python?
System programming
Graphical User Interface Programming
Internet Scripting
Component Integration
Database Programming
Gaming, Images, XML , Robot and more
9
10. Who uses python today
Python is being applied in real revenue-generating products
by real companies. For instance:
Google makes extensive use of Python in its web search
system, and employs Pythons creator.
Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM
use Python for hardware testing.
ESRI uses Python as an end-user customization tool for its
popular GIS mapping products.
The YouTube video sharing service is largely written in
Python
10
11. Why do people use Python?
The following primary factors cited by Python users
seem to be these:
Python is object-oriented
Structure supports such concepts as polymorphism,
operation overloading, and multiple inheritance.
.
It's free (open source)
Downloading and installing Python is free and easy
Source code is easily accessible
11
12. It's powerful
- Dynamic typing
- Built-in types and tools
- Library utilities
- Third party utilities (e.g. Numeric, NumPy, SciPy)
- Automatic memory management
It's portable
- Python runs virtually every major platform used today
- As long as you have a compatible Python interpreter
installed, Python programs will run in exactly the same
manner, irrespective of platform.
12
13. Installing Python
Python is pre-installed on most Unix systems, including Linux
and MAC OS X
But for in Windows Operating Systems , user can
download from the
https://www.python.org/downloads/
- from the above link download latest version of
python IDE and install, recent version is 3.4.1 but
most of them uses version 2.7.7 only
13
14. After installing the
Python Ver#2.7.7, go to
start menu then click on
python 2.7 in that one
you can select python
(command line) it is
prompt with >>>
14
16. Running Python
Once you're inside the Python interpreter, type in commands at will.
Examples:
>>> print 'Hello world'
Hello world
16
17. Python Code Execution
Pythons traditional runtime execution model: source code
you type is translated to byte code, which is then run by the
Python Virtual Machine. Your code is automatically
compiled, but then it is interpreted.
Source code extension is .py
Byte code extension is .pyc (compiled python code)
17
19. Math
Try typing this into Code:
>>> print 3 + 12
15
>>> print 12 3
9
>>> print 9 + 5 15 + 12
11
Operators:
add: +
subtract: -
Note: dont type the arrows >>> !
19
20. Math
Rule: If you want Python to answer in floats, you have to
talk to it in floats.
More operators:
divide: /
multiply: *
>>> print 3 * 12 36
>>> print 12 / 3 4
>>> print 11 / 3 3
>>> print 12.0 / 3.0 4.0
>>> print 11.0 / 3.0 3.66
20
28. 28
Data Type:
Python has many native data types. Here are the important ones:
Booleans are either True or False.
Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions
(1/2 and 2/3), or even complex numbers.
Strings are sequences of Unicode characters, e.g. an HTML
document.
Bytes and byte arrays, e.g. a JPEG image file.
Lists are ordered sequences of values.
Tuples are ordered, immutable sequences of values.
Sets are unordered bags of values.
29. Example:
29
String Whoop!
Integer 42
Float 3.14159
List [John, Paul, George, Ringo]
Python can tell us about types using the type()
function:
>>> print type(Whoop!)
<type str>
31. 31
List:
The list is a most versatile Data type available in Python
which can be written as a list of comma-separated values
(items) between square brackets. Important thing about a
list is that items in a list need not be of the same type.
Example:
list1 = ['physics', 'chemistry', 1997, 2000];
list2 = [1, 2, 3, 4, 5 ];
32. 32
SN Function with Description
1 cmp(list1, list2) Compares elements of both lists.
2 len(list) Gives the total length of the list.
3 max(list) Returns item from the list with max value.
4 min(list) Returns item from the list with min value.
5 list(seq) Converts a tuple into list.
33. List: a sequence of objects
>>> Beatles = [John, Paul, George,
Ringo]
>>> grades = [82, 93, 67, 99, 100]
Guess what this will output:
>>> type(Beatles)
>>> type(grades)
33
34. Lists
Index: Where an item is in the list
>>> Beatles = [John, Paul, George,
Ringo]
>>> Beatles[0]
John
[John, Paul, George, Ringo]
0 1 2 3
Python always starts at zero!
34
36. 36
Tuples:
A tuple is a sequence of immutable Python objects. Tuples are
sequences, just like lists. The differences between tuples and
lists are, the tuples cannot be changed unlike lists and tuples
use parentheses, whereas lists use square brackets.
Example:
tup2 = (1, 2, 3, 4, 5 );
tup3 = ("a", "b", "c", "d);
Accessing Values:
print "tup2[1:5]:
Output:
tup2[1:5]: [2, 3, 4, 5]
37. 37
Built-in Tuple Functions
Python includes the following tuple functions
SN Function with Description
1 cmp(tuple1, tuple2) Compares elements of both tuples.
2 len(tuple) Gives the total length of the tuple.
3 max(tuple) Returns item from the tuple with max value.
4 min(tuple) Returns item from the tuple with min value.
5 tuple(seq) Converts a list into tuple.
39. 39
Loop Type Description
while loop Repeats a statement or group of statements
while a given condition is TRUE. It tests the
condition before executing the loop body.
for loop Executes a sequence of statements multiple
times and abbreviates the code that
manages the loop variable.
nested loops You can use one or more loop inside any
another while, for or do..while loop.
40. 40
Statement Description
if statements An if statement consists of a boolean expression
followed by one or more statements.
if...else statements An if statement can be followed by an
optional else statement, which executes when
the boolean expression is FALSE.
nested if statements You can use one if or else if statement inside
another if or else if statement(s).
41. 41
I believe the trial has shown conclusively that it is both possible and
desirable to use Python as the principal teaching language:
o It is Free (as in both cost and source code).
o It is trivial to install on a Windows PC allowing students to take
their interest further. For many the hurdle of installing a Pascal or
C compiler on a Windows machine is either too expensive or too
complicated;
o It is a flexible tool that allows both the teaching of traditional
procedural programming and modern OOP; It can be used to
teach a large number of transferable skills;
o It is a real-world programming language that can be and is used in
academia and the commercial world;
o It appears to be quicker to learn and, in combination with its many
libraries, this offers the possibility of more rapid student
development allowing the course to be made more challenging
and varied;
o and most importantly, its clean syntax offers increased
understanding and enjoyment for students;