This document provides an introduction to the Python programming language. It discusses Python's design philosophy emphasizing readability. It also covers printing messages, reading input, variables and data types, operators, and basic syntax like comments and identifiers. Arithmetic, relational, logical and bitwise operators are explained along with examples.
All data values in Python are encapsulated in relevant object classes. Everything in Python is an object and every object has an identity, a type, and a value. Like another object-oriented language such as Java or C++, there are several data types which are built into Python. Extension modules which are written in C, Java, or other languages can define additional types.
To determine a variable's type in Python you can use the type() function. The value of some objects can be changed. Objects whose value can be changed are called mutable and objects whose value is unchangeable (once they are created) are called immutable.
All data values in Python are encapsulated in relevant object classes. Everything in Python is an object and every object has an identity, a type, and a value. Like another object-oriented language such as Java or C++, there are several data types which are built into Python. Extension modules which are written in C, Java, or other languages can define additional types.
To determine a variable's type in Python you can use the type() function. The value of some objects can be changed. Objects whose value can be changed are called mutable and objects whose value is unchangeable (once they are created) are called immutable.
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
Command-line arguments are given after the name of the program in command-line shell of Operating Systems.
To pass command line arguments, we typically define main() with two arguments : first argument is the number of command line arguments and second is list of command-line arguments.
In this PPT you will learn how to use looping in python.
For more presentation in any subject please contact us on
raginijain0208@gmail.com.
You get a new presentation every Sunday at 10 AM.
Learn more about Python by clicking on given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
Python provides numerous built-in functions that are readily available to us at the Python prompt. Some of the functions like input() and print() are widely used for standard input and output operations respectively.
Python too supports file handling and allows users to handle files i.e., to read and write files, along with many other file handling options, to operate on files. The concept of file handling has stretched over various other languages, but the implementation is either complicated or lengthy, but alike other concepts of Python, this concept here is also easy and short. Python treats file differently as text or binary and this is important. Each line of code includes a sequence of characters and they form text file. Each line of a file is terminated with a special character, called the EOL or End of Line characters like comma {,} or newline character. It ends the current line and tells the interpreter a new one has begun. Let’s start with Reading and Writing files.
In this module of python programming you will be learning about control statements. A control statement is a statement that determines whether other statements will be executed. An if statement decides whether to execute another statement, or decides which of two statements to execute. A loop decides how many times to execute another statement.
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
Command-line arguments are given after the name of the program in command-line shell of Operating Systems.
To pass command line arguments, we typically define main() with two arguments : first argument is the number of command line arguments and second is list of command-line arguments.
In this PPT you will learn how to use looping in python.
For more presentation in any subject please contact us on
raginijain0208@gmail.com.
You get a new presentation every Sunday at 10 AM.
Learn more about Python by clicking on given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
Python provides numerous built-in functions that are readily available to us at the Python prompt. Some of the functions like input() and print() are widely used for standard input and output operations respectively.
Python too supports file handling and allows users to handle files i.e., to read and write files, along with many other file handling options, to operate on files. The concept of file handling has stretched over various other languages, but the implementation is either complicated or lengthy, but alike other concepts of Python, this concept here is also easy and short. Python treats file differently as text or binary and this is important. Each line of code includes a sequence of characters and they form text file. Each line of a file is terminated with a special character, called the EOL or End of Line characters like comma {,} or newline character. It ends the current line and tells the interpreter a new one has begun. Let’s start with Reading and Writing files.
In this module of python programming you will be learning about control statements. A control statement is a statement that determines whether other statements will be executed. An if statement decides whether to execute another statement, or decides which of two statements to execute. A loop decides how many times to execute another statement.
This presentation explains about operator overloading in C++.
It explains how to overload using member functions and friend functions. It discusses about the operators which can be overloaded only using member function and the operators which cannot be overloaded.
https://youtu.be/cSH1dm9dXHM
This video explains about Range based for loop which can be used to traverse the elements of any container.
It demonstrates with primitive arrays, vectors and list.
Capture the traversed elements by value and by reference.
It also demonstrates using auto to simplify the declarations.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Â
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Â
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Understanding Globus Data Transfers with NetSageGlobus
Â
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
First Steps with Globus Compute Multi-User EndpointsGlobus
Â
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Â
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
Large Language Models and the End of ProgrammingMatt Welsh
Â
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
Â
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Â
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
Â
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Â
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Â
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
Â
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Â
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
2. Python
Printing Messages on Screen
Reading input from console
Python Identifiers and Keywords
Data types in Python
Operators
Using math library function
3. ï‚— Developed by GuidoVan Roussum in
1991.
ï‚— Python is processed at runtime by
the interpreter.
ï‚— There is no need to compile your
program before executing it.
ï‚— Python has a design philosophy that
emphasizes code readability.
5. Print Statement
#Python 2.x Code #Python 3.x Code
print "SIKANDER"
print 5
print 2 + 4
SIKANDER
5
6
The "print" directive prints contents to console.
 In Python 2, the "print" statement is not a function,and therefore it is invoked
without parentheses.
 In Python 3, it is a function, and must be invoked with parentheses.
(It includes a newline, unlike in C)
 A hash sign (#) that is not inside a string literal begins a comment.
All characters after the # and up to the end of the physical line are part of the
comment and the Python interpreter ignores them.
print("SIKANDER")
print(5)
print(2 + 4)
Output
6. Python Identifiers
ï‚— Identifier is the name given to entities like class, functions, variables etc.
ï‚— Rules for writing identifiers
ï‚— Identifiers can be a combination of letters in lowercase (a to z) or
uppercase (A to Z) or digits (0 to 9) or an underscore (_).
ï‚— An identifier cannot start with a digit.
ï‚— Keywords cannot be used as identifiers.
ï‚— We cannot use special symbols like !, @, #, $, % etc. in our identifier.
7. Python Keywords
ï‚— Keywords are the reserved words in Python.
ï‚— We cannot use a keyword as variable
name, function name or any other identifier.
ï‚— They are used to define the syntax and structure of the
Python language.
ï‚— keywords are case sensitive.
ï‚— There are 33 keywords in Python 3.3.
8. Keywords in Python programming language
False class finally is return
None continue for lambda try
True def from nonlocal while
and del global not with
as elif if or yield
assert else import pass
break except in raise
All the keywords except True, False and None are in
lowercase
9. PythonVariables
ï‚— A variable is a location in memory used to store
some data (value).
ï‚— They are given unique names to differentiate
between different memory locations.The rules
for writing a variable name is same as the rules
for writing identifiers in Python.
ï‚— We don't need to declare a variable before using
it.
ï‚— In Python, we simply assign a value to a variable
and it will exist.
ï‚— We don't even have to declare the type of the
variable.This is handled internally according to
the type of value we assign to the variable.
10. Variable assignment
ï‚— We use the assignment operator (=) to
assign values to a variable.
ï‚— Any type of value can be assigned to any
valid variable.
11. Multiple assignments
ï‚— In Python, multiple assignments can be made in
a single statement as follows:
If we want to assign the same value to multiple
variables at once, we can do this as
x = y = z = "same"
12. Data types in Python
ï‚— Every value in Python has a datatype.
ï‚— Since everything is an object in Python
ï‚— Data types are actually classes and variables are
instance (object) of these classes.
ï‚— Numbers
ï‚— int
ï‚— float
 String – str
ï‚— Boolean - bool
13. Type of object – type()
ï‚— type() function can be used to know to
which class a variable or a value belongs
to.
14. Reading Input
Python 2.x Python 3.x
ï‚— print("Enter the name :")
ï‚— name = raw_input()
ï‚— print(name)
ï‚— print("Enter the name :")
ï‚— name = input()
ï‚— print(name)
If you want to prompt the user for input, you can use raw_input in Python 2.X, and
just input in Python 3.
15. ï‚— name = input("Enter the name :")
 print(“Welcome “ + name)
ï‚¡ Input function can print a prompt and
read the input.
16. Arithmetic Operators
Operator Meaning Example
+ Add two operands or unary plus x + y
+2
- Subtract right operand from the left or
unary minus
x - y
-2
* Multiply two operands x * y
/ Divide left operand by the right one
(always results into float)
x / y
% Modulus - remainder of the division of left
operand by the right
x % y (remainder of x/y)
// Floor division - division that results into
whole number adjusted to the left in the
number line
x // y
** Exponent - left operand raised to the
power of right
x**y (x to the power y)
19. ï‚— Data read from input is in the form of string.
ï‚— To convert to integer, we need to typecast.
ï‚— Syntax : datatype(object)
20.
21. Exercise
ï‚— Write a program to calculate the area of
Circle given its radius.
 area = πr2
22.
23.
24. ï‚— Write a program to calculate the area of
circle given its 3 sides.
ï‚— s = (a+b+c)/2
 area = √(s(s-a)*(s-b)*(s-c))
25.
26. Given the meal price (base cost of a meal), tip percent (the percentage of
the meal price being added as tip), and tax percent (the percentage of
the meal price being added as tax) for a meal, find and print the
meal's total cost.
Input
12.00 20 8
Output
The total meal cost is 15 dollars.
27.
28. ï‚— Temperature Conversion.
ï‚— Given the temperature in Celsius, convert
it to Fahrenheit.
ï‚— Given the temperature in Fahrenheit,
convert it to Celsius.
29. Relational operators
ï‚— Relational operators are used to compare values.
ï‚— It returns True or False according to condition
Operator Meaning Example
>
Greater that - True if left operand is greater than the
right
x > y
< Less that - True if left operand is less than the right x < y
== Equal to - True if both operands are equal x == y
!= Not equal to - True if operands are not equal x != y
>=
Greater than or equal to - True if left operand is
greater than or equal to the right
x >= y
<=
Less than or equal to - True if left operand is less
than or equal to the right
x <= y
30.
31.
32. Logical operators
Operator Meaning Example
and True if both the operands are true x and y
or True if either of the operands is true x or y
not
True if operand is false
(complements the operand)
not x
33.
34. Bitwise operators
ï‚— Bitwise operators operates on individual
bits of number.
Operator Meaning Example
& Bitwise AND 10 & 4 = 0
| Bitwise OR 10 | 4 = 14
~ Bitwise NOT ~10 = -11
^ Bitwise XOR 10 ^ 4 = 14
>> Bitwise right shift 10>> 2 = 2
<< Bitwise left shift 10<< 2 = 42
35. Compound Assignment operators
Operator Example Equivatent to
= x = 5 x = 5
+= x += 5 x = x + 5
-= x -= 5 x = x - 5
*= x *= 5 x = x * 5
/= x /= 5 x = x / 5
%= x %= 5 x = x % 5
//= x //= 5 x = x // 5
**= x **= 5 x = x ** 5
&= x &= 5 x = x & 5
|= x |= 5 x = x | 5
^= x ^= 5 x = x ^ 5
>>= x >>= 5 x = x >> 5
<<= x <<= 5 x = x << 5
36. Precedence of Python Operators
Operators Meaning
() Parentheses
** Exponent
+x, -x, ~x Unary plus, Unary minus, Bitwise NOT
*, /, //, % Multiplication,Division, Floor division, Modulus
+, - Addition,Subtraction
<<, >> Bitwise shift operators
& Bitwise AND
^ Bitwise XOR
| Bitwise OR
==, !=, >, >=, <, <=, is, is not, in, not in Comparisions,Identity, Membership operators
not Logical NOT
and Logical AND
or Logical OR