Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
The objectives of the seminar are to shed a light on the premises of FP and give you a basic understanding of the pillars of FP so that you would feel enlightened at the end of the session. When you walk away from the seminar you should feel an inner light about the new way of programming and an urge & motivation to code like you never before did!
Functional programming should not be confused with imperative (or procedural) programming. Neither it is like object oriented programming. It is something different. Not radically so, since the concepts that we will be exploring are familiar programming concepts, just expressed in a different way. The philosophy behind how these concepts are applied to solving problems are also a little different. We shall learn and talk about essentially the fundamental elements of Functional Programming.
First in the series of slides for python programming, covering topics like programming language, python programming constructs, loops and control statements.
Python Advanced – Building on the foundationKevlin Henney
This is a two-day course in Python programming aimed at professional programmers. The course material provided here is intended to be used by teachers of the language, but individual learners might find some of this useful as well.
The course assume the students already know Python, to the level taught in the Python Foundation course: http://www.slideshare.net/Kevlin/python-foundation-a-programmers-introduction-to-python-concepts-style)
The course is released under Creative Commons Attribution 4.0. Its primary location (along with the original PowerPoint) is at https://github.com/JonJagger/two-day-courses/tree/master/pa
The emergence of support of functions and lambda expressions as first-class citizens in Java 8 gives us a tremendous opportunity to adapt the concepts of functional programming to the Java language.
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
Presented during the DrupalCamp Cebu 2015. It demonstrates how we handled and integrated multiple, switchable, and extendable map APIs with our Drupal site (CNN Travel). It showcases the modern map APIs particularly the Google Maps, HERE Maps, and MapBox.
Likewise, it will feature the Strategy Design Pattern for easy switching of map objects' context and activating a particular map API. Discussion will include the various entity contexts (node and taxonomy pages), Drupal admin form for inputting API credentials, Drupal.settings' object integration, the template files and other loaded assets, the rendered widgets, as well as the challenges we encountered and their corresponding solutions/workaround.
The session is targeted for those interested in design patterns, web mapping, or implementing switchable JavaScript APIs (multiple chart APIs, map APIs, or any family of 3rd-party APIs).
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
The objectives of the seminar are to shed a light on the premises of FP and give you a basic understanding of the pillars of FP so that you would feel enlightened at the end of the session. When you walk away from the seminar you should feel an inner light about the new way of programming and an urge & motivation to code like you never before did!
Functional programming should not be confused with imperative (or procedural) programming. Neither it is like object oriented programming. It is something different. Not radically so, since the concepts that we will be exploring are familiar programming concepts, just expressed in a different way. The philosophy behind how these concepts are applied to solving problems are also a little different. We shall learn and talk about essentially the fundamental elements of Functional Programming.
First in the series of slides for python programming, covering topics like programming language, python programming constructs, loops and control statements.
Python Advanced – Building on the foundationKevlin Henney
This is a two-day course in Python programming aimed at professional programmers. The course material provided here is intended to be used by teachers of the language, but individual learners might find some of this useful as well.
The course assume the students already know Python, to the level taught in the Python Foundation course: http://www.slideshare.net/Kevlin/python-foundation-a-programmers-introduction-to-python-concepts-style)
The course is released under Creative Commons Attribution 4.0. Its primary location (along with the original PowerPoint) is at https://github.com/JonJagger/two-day-courses/tree/master/pa
The emergence of support of functions and lambda expressions as first-class citizens in Java 8 gives us a tremendous opportunity to adapt the concepts of functional programming to the Java language.
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
Presented during the DrupalCamp Cebu 2015. It demonstrates how we handled and integrated multiple, switchable, and extendable map APIs with our Drupal site (CNN Travel). It showcases the modern map APIs particularly the Google Maps, HERE Maps, and MapBox.
Likewise, it will feature the Strategy Design Pattern for easy switching of map objects' context and activating a particular map API. Discussion will include the various entity contexts (node and taxonomy pages), Drupal admin form for inputting API credentials, Drupal.settings' object integration, the template files and other loaded assets, the rendered widgets, as well as the challenges we encountered and their corresponding solutions/workaround.
The session is targeted for those interested in design patterns, web mapping, or implementing switchable JavaScript APIs (multiple chart APIs, map APIs, or any family of 3rd-party APIs).
إذا كُنت من هواة البرمجة ولم تُحلّق في هذا العالم بعد فالطريق ما زال مفتوحًا أمامك، فالفضاء موجود أمامك لتختار أحد المسارات وتسلكها فورًا.
اختيار المسار بحد ذاته هو الحاجز الذي نقف عنده في الغالب، بل ويستغرق وقتًا أطول من وقت التعلّم والمُمارسة، لكن ليس هُناك أجمل من الاستفادة من التقنيات الموجودة بين أيدينا حاليًا لتطوير أدوات نستطيع الاستفادة منها.
لمزيد من المعلومات اشتركوا في قائمتنا البريدية:
https://www.apptrainers.com/
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition pg. 25
An Introduction to
Computer Science with Java, Python and C++
Community College of Philadelphia edition
Copyright 2017 by C.W. Herbert, all rights reserved.
Last edited October 8, 28, 2019 by C. W. Herbert
This document is a draft of a chapter from An Introduction to Computer Science with Java, Python and C++, written by Charles Herbert. It is available free of charge for students in Computer Science courses at Community College of Philadelphia during the Fall 2019 semester. It may not be reproduced or distributed for any other purposes without proper prior permission.
Please report any typos, other errors, or suggestions for improving the text to [email protected]
Chapter 5 – Python Functions and Modular Programming
Contents
Lesson 5.1User Created Functions in Python2
Python Function Parameters2
Value returning functions3
Example – Methods and Parameter Passing5
9
Lesson 5.2Top-Down Design and Modular Development10
Chapter Exercises13
User Created Functions in Python
So far we have only created software with one continuous Python script. We have used functions from other python modules, such as the square root method from the math class math.sqrt(n). Now we will begin to create our own functions of our own.
A Python function is a block of code that can be used to perform a specific task within a larger computer program. It can be called as needed from other Python software. Most programming languages have similar features, such as methods in Java or subroutines in system software.
The code for user-defined functions in Python is contained in a function definition. A Python function definition is a software unit with a header and a block of Python statements. The header starts with the keyword def followed by the name of the function, then a set parenthesis with any parameters for the function. A colon is used after the parentheses to indicate a block of code follows, just as with the if and while statements. The block of code to be included within the function is indented.
Here is an example of a Python function:
# firstFunction.py
# first demonstration of the use of a function for CSCI 111
# last edited 10/08/2o19 by C. Herbert
function
definition
def myFunction():
print ( "This line being printed by the function MyFunction.\n")
# end myFunction()
### main program ###
function used by the main part of the script
print("Beginning\n")
myFunction()
print("End\n")
# end main program
Functions can used for code that will be repeated within a program, or for modular development, in which long programs are broken into parts and the parts are developed independently. The parts can be developed as Python functions, then integrated to work together by being called from other software.
Python Function Parameters
Data can be passed to a Python function as a parameter of the function. Function parameters are variables listed in parentheses foll ...
CS 23001 Computer Science II Data Structures & AbstractionPro.docxfaithxdunce63732
CS 23001 Computer Science II: Data Structures & Abstraction
Project #4
Spring 2015
Objectives:
· Develop and use a Tree ADT (n-ary)
· Apply and use tree traversal algorithms
· Manipulate trees by inserting and deleting nodes
· Apply and use STL
Problem:
Build a program profiler. Construct a program to instrument C++ source code to support program profiling.
It is often important to determine how many times a function or statement is executed. This is useful not only for debugging but for determining what parts of a program may need to be optimized. This process is called profiling. That is, a execution profile presents how many times each part of a program is executed using a given set of input data (or for some run time scenario). To compute a profile, statements need to be added to the code that keep track of how many times a function or statement is executed. The process of adding these statements is called instrumenting the code.
To implement a profiler one must first parse the source code and generate an Abstract Syntax Tree (AST) of the code. Each node of the AST describes the syntactic category of the code stored within it (function, statement, while-statement, etc.). So at the top level is a syntactic category corresponding to a program, class, or function (such as in the case of a main). Under that are sub-trees that further detail the syntactic categories of each part of the code. Such things as declarations, parameter lists, while-statement, and expression statements will describe the various parts of the program.
After the AST is generated it can then be traversed and the appropriate syntactic structures can be found that need to be instrumented. Once a construct is found, say a function, new code can be inserted that keeps track of how many times that function is executed.
The most difficult part of constructing a profiler is correctly parsing the source code. Unfortunately, C++ is notoriously difficult to parse. So here we will use a parsing tool called src2srcml. This tool reads in C++ code and marks up the code with XML tags (e.g., block, if, while, condition, name, etc). That is, the output is an AST in XML. The XML representation is called srcML (source code markup language).
A number of srcML data files are provided for the project. However, you can use your own program as input. To run srcML on wasp or hornet you will first need to set a PATH variable so the command can be found. You need to execute the command:
export PATH=/local/opt/srcml/bin:$PATH
It is best if you insert this line into your .bash_profile file in your home directory on wasp/hornet.
Then to generate the srcML file for your own code use the following:
src2srcml main.cpp -o main.cpp.xml
Use the following for a list of all options:
src2srcml --help
More information about srcML can be found at www.srcML.org including a list of all the tag names (see Getting Started). You can also download srcML if you want it on your own machine.
Your .
Programming Fundamentals Functions in C and typesimtiazalijoono
Programming Fundamentals
Functions in C
Lecture Outline
• Functions
• Function declaration
• Function call
• Function definition
– Passing arguments to function
1) Passing constants
2) Passing variables
– Pass by value
– Returning values from functions
• Preprocessor directives
• Local and external variables
A C++ program //include headers; these are modules that include functions that you may use in your //program; we will almost always need to include the header that // defines cin and cout; the header is called iostream.h #include <iostream.h>
int main() {
//variable declaration //read values input from user //computation and print output to user return 0; }
After you write a C++ program you compile it; that is, you run a program called compiler that checks whether the program follows the C++ syntax – if it finds errors, it lists them – If there are no errors, it translates the C++ program into a program in machine language which you can execute.
Similar to Python Programming - II. The Basics (20)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)Ranel Padon
Showcases the most useful Drupal hooks and functions. Demonstrates their powerful and beautiful interactions. Uses a custom chart block to illustrate the synergy of functions.
Discusses how to configure and implement custom CKEditor widgets in Drupal. Includes numerous examples of custom widgets and actual widgets that we use in CNN Travel site.
Note that you could also download the PDF copy of this presentation by clicking the Save/Download button. The PDF copy has far better quality than the one rendered here online.
Views Unlimited: Unleashing the Power of Drupal's Views ModuleRanel Padon
Unleashing the power of Views Drupal module. Discusses Display Formats (Map, Chart, Slideshow, Data Export), Fields, Basic Filters, Exposed Filters, Contextual Filters, Relationships, Attachment, and so on. Includes numerous sample use cases and recommendations.
Of Nodes and Maps (Web Mapping with Drupal - Part II)Ranel Padon
Discusses the input, storage, and display mechanisms of spatial fields on nodes: how to utilize Geofield's input widgets and output formatters, how to integrate Geofield with Leaflet and OpenLayers, and how to integrate them with Views.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
2. PYTHON PROGRAMMING TOPICS
I
• Introduction to Python Programming
II
• Python Basics
III
• Controlling the Program Flow
IV
• Program Components: Functions, Classes, Modules, and Packages
V
• Sequences (List and Tuples), and Dictionaries
VI
• Object-Based Programming: Classes and Objects
VII
• Customizing Classes and Operator Overloading
VIII
• Object-Oriented Programming: Inheritance and Polymorphism
IX
• Randomization Algorithms
X
• Exception Handling and Assertions
XI
• String Manipulation and Regular Expressions
XII
• File Handling and Processing
XIII
• GUI Programming Using Tkinter
3.
4. RUNNING A COMPUTER PROGRAM
Source
Translator
Target
Low-Level Language
Assembler
Machine Code
High-Level Language
Compiler
Interpreter
5. RUNNING A PYTHON PROGRAM
to write & run a Python program you need a Text Editor
and a Python Interpreter (preferably Version 2.x
since version 3.x is not yet mainstream)
Possible Ways (Common Ones)
1. Atom/Notepad++/Sublime Text and command prompt
2. Atom/Notepad++/Sublime Text and IDLE
3. IDLE
4. PyCharm, PyScripter, Aptana Studio, NINJA IDE…
6. HELLO WORLD
as a salute to all programmers in the world, beginning
programmers usually print in the console the infamous Hello
World mystical line
print “Hello World”
7. HELLO WORLD IN 2 LINES
print “Hello”
print “World”
in Python, the print statement will always
move the cursor to the next line after printing
8. HELLO WORLD, SUPRESSING NEWLINES
print “Hello”,
print “World”
A comma (,) will suppress the auto newline insertion
in print statements; it will add a space instead.
12. EXERCISE
Using Escape Sequences, print the following, including the
punctuations:
“Mahal ko po si Migueeeel!”, sabi ni Amanda.
“Hindi maari yan, lalo na’t si Miguel ay isang Halimaw!”, ang
tugon ng kanyang ina.
13. COMMENTS
comments don’t do anything except to serve as a
documentation part of a program
use comments as often as you can because programmers
tend to forget what they’ve programmed after a month or so
#this is a comment
print ‘Magandang Araw Po!’
#this function computes the sum of two integers
def sum(x, y):
...
15. RAW INPUT, TEXT TO INTEGER
x = int(raw_input(“Unang Numero:”))
y = int(raw_input(“Pangalawang Numero:”))
print x + y
int is a built-in function; it’s included in the standard library &
converts a string to integer
16. INPUT, AUTO TEXT TO INTEGER
x = input(“Unang Numero:”)
y = input(“Pangalawang Numero:”)
print x + y
input is a built-in function; it’s included in the standard library
& converts a string number to integer.
27. STRING FORMATTING
1. Rounding-off floating-point values
2. Representing numbers in exponential notation
3. Aligning a column of numbers
4. Right-justifying and left-justifying outputs
5. Inserting characters or strings at precise locations
6. Displaying with fixed-size field widths and precision
36. COMMON ERROR
reversing the order of the pair of operators in any of the operators: !
=, <>, >= and <=
Error: writing them as =!, ><, => and =<
37. COMMON ERROR
Confusing the equality operator == with the assignment symbol =
is an error.
The equality operator should be read “is equal to” and the
assignment symbol should be read “gets,” “gets the value of” or
“is assigned the value of.”
In Python, the assignment symbol causes a syntax error when
used in a conditional statement.
43. COMMON ERROR
Failure to insert a colon (:) in an if structure.
Failure to indent the body of an if structure.
44. LINE CONTINUATION
A lengthy statement may be spread over several lines with the
backslash () line continuation character.
If a single statement must be split across lines, choose breaking
points that make sense, such as after a comma in a print
statement or after an operator in a lengthy expression.
48. PRACTICE EXERCISE 2
Write a program that requests the user to enter two numbers and
prints the sum, product, difference and quotient of the two numbers.
49. PRACTICE EXERCISE 3
Write a program that reads in the radius of a circle and prints the
circle’s diameter, circumference and area. Use the constant value
3.14159 for π. Do these calculations in output statements.
50. PRACTICE EXERCISE 4
Write a program that reads in two integers and determines and
prints whether the first is a multiple of the second.
51. PRACTICE EXERCISE 5
Write a program that reads in a 3-digit number, dissects the number
and prints the 3 individual numbers.
For example, 214 will be printed as:
Hundreds: 2
Tens: 1
Ones: 4
52. PRACTICE EXERCISE 5 | SOLUTION
a = 14
print "Tens:", a/10
print "Ones:", a%10
56. PRACTICE EXERCISE 5 | SOLUTION
a = input(“Magbigay ng 3-digit na numero:”)
print "Hundreds:", a/100
remainder_100 = a%100
print "Tens:", remainder_100/10
remainder_10 = remainder_100%10
print "Ones:", remainder_10
57. PRACTICE EXERCISE 6
Write a program that reads in 3 integers and determines and prints
the largest number.
58. PRACTICE EXERCISE 6 | SOLUTION
a = 2
b = 1
c = 4
max = a
if b > max:
max = b
if c > max:
max = c
print max
59. PRACTICE EXERCISE 6 | SOLUTION
a = input("Unang Numero Po:")
b = input("Pangalawang Numero Po:")
c = input("Pangatlong Numero Po:")
max = a
if b > max:
max = b
if c > max:
max = c
print max
60. PRACTICE EXERCISE 7
Write a program that reads in 3 integers and determines and prints
the smallest & largest numbers.
61. PRACTICE EXERCISE 7 | SOLUTION
a = input("Unang Numero Po:")
b = input("Pangalawang Numero Po:")
c = input("Pangatlong Numero Po:")
max = a
min = a
if b > max:
max = b
if c > max:
max = c
print max
if b < min:
min = b
if c < min:
min = c
print min
62.
63. The Amusing Evolution of a Programmer
http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html
64. REFERENCES
q Deitel, Deitel, Liperi, & Wiedermann - Python: How to Program (2001).
q Disclaimer: Most of the images/information used here have no proper source
citation, and I do not claim ownership of these either. I don’t want to reinvent the
wheel, and I just want to reuse and reintegrate materials that I think are useful or
cool, then present them in another light, form, or perspective. Moreover, the
images/information here are mainly used for illustration/educational purposes
only, in the spirit of openness of data, spreading light, and empowering people
with knowledge. J