Computer Science 1 CSci 1100 Lecture 3 Python Functions
|
|
|
- Kerry Wade
- 10 years ago
- Views:
Transcription
1 Reading Computer Science 1 CSci 1100 Lecture 3 Python Functions Most of this is covered late Chapter 2 in Practical Programming and Chapter 3 of Think Python. Chapter 6 of Think Python goes into more detail, but we are not quite ready for that yet. Back to Area and Volume Calculation Recall our program to compute the surface area and volume of a cylinder: >>> >>> radius = 2 >>> height = 10 >>> base_area = pi * radius ** 2 >>> volume = base_area * height >>> surface_area = 2 * base_area + 2 * pi * radius * height >>> print "volume is", volume, ", surface area is", surface_area volume is , surface area is If we want to run all or part of this again, on different values, we either have to edit the program and rerun it, or we have to type the statements all over again. Instead, we will gather the code into one or more Python functions that we can run repeatedly. The purpose of today s class is to introduce the basics of writing and running Python functions. A Function to Compute the Area of a Circle In mathematics, you might write a function to calculate the area of a circle as a(r) = πr 2 In Python, when typing directly into the interpreter, we write >>> def area_circle(radius): return pi * radius ** 2 Then we can run this using >>> area_circle(1) >>> area_circle(2) >>> area_circle(75.1) Note that by using examples with small values for the radius we can easily check that our function is correct. Important syntax includes Use of the keyword def and the : to indicate the start of the function Indentation for the lines after the def line Blank line at the end of the function
2 The... are produced by the Python interpreter, just like the >>> are. What does Python do as we type? 1. Reads the keyword def and notes that a function is being defined 2. Reads the rest of the function definition, checking its syntax 3. Notes the end of the definition when the blank line is reached. 4. Sees the function call >>> area_circle(1) at what s known as the top level or main level of execution (indicated by the presence of >>>), and Jumps back up to the function Assigns 1 to radius Runs the code inside the function Returns the result of the calculation back to the top level and outputs the returned result 5. Repeats the process of running the function at the line >>> area_circle(2) this time with radius assigned the value 2 6. Repeats the process again at the line >>> area_circle(75.1) To reiterate, the flow of control of Python here involves Reading the function definition without executing Seeing a call to the function, jumping up to the start of the function and executing Returning back to the place in the program that called the function and continuing. Arguments, Parameters and Local Variables Arguments are the values 1, 2 and 75.1 in our above examples. These are each passed to the parameter called radius named in the function header. This parameter is used just like a variable in the function. The variable pi is a local variable to the function. Neither pi nor radius exists at the top / main level. At this level, they are undefined variables. Try it out. Exercise Write a function to convert the Celsius temperature to a Fahrenheit temperature. Write code to use the function. What are the arguments, parameters and local variables? 2
3 Functions with Multiple Arguments / Parameters For our volume calculation, we write a function involving two parameters, called with two arguments: >>> def volume(radius, height): return pi * radius ** 2 * height... >>> print "volume of cylinder with radius", 1, "and height 2 is", volume(1,2) >>> print "volume of cylinder with radius", 2, "and height 1 is", volume(2,1) Python determines which argument goes to which parameter based on the order of the arguments, the first going to radius and the second going to height. In this example, we have provided clearer, more extensive output. Python and Program Files Ways to run Python code include: Typing directly into the Python interpreter. This is what we do at the bottom of the Wing IDE. The >>> and... symbols are generated by the interpreter when we are typing in the program directly. Typing our code into a file (which we will call volume.py) and then either Opening the interpreter and running the code Running the Python code from a command shell The latter is in fact the most common way of running Python programs in practice. We will demonstrate all three in class. Note that providing more information in our print statement makes the output of the program from the command-line more self-explanatory. Functions That Call Functions Let s make use of our area of circle function to compute the surface area of the cylinder. Here is the Python code, in file surface_area.py: def area_cylinder(radius,height): circle_area = area_circle(radius) height_area = 2 * radius * pi * height return 2*circle_area + height_area def area_circle(radius): return pi * radius ** 2 print The area of a circle of radius 1 is, area_circle(1) r = 2 height = 10 print The surface area of a cylinder with radius, r print and height, height, is, area_cylinder(r,height) Now we ve defined two functions, one of which calls the other. 3
4 Flow of control proceeds in two different ways here: 1. Starting at the first print at the top level, into area_circle and back. 2. At the second print (a) into area_cylinder, (b) into area_circle, (c) back to area_cylinder, and (d) back to the top level. The Python interpreter keeps track of where it is working and where to return when it is done with a function, even if it is back into another function. Exercise Write a function to compute the area of a rectangle. Write a second function that takes the length, width and height of a rectangular solid and computes its surface area. Gathering Our Example Into One Big Function We can gather our code in one complete set of functions, writing them into a file called area_volume.py: def area_circle(radius): return pi * radius ** 2 def volume_cylinder(radius,height): area = area_circle(radius) return area * height def area_cylinder(radius,height): circle_area = area_circle(radius) height_area = 2 * radius * pi * height return 2*circle_area + height_area def area_and_volume(radius, height): print "For a cylinder with radius", radius, "and height", height print "The surface area is", area_cylinder(radius,height) print "The volume is", volume_cylinder(radius,height) Now we have functionality that we can use to generate clear, complete output for many different values of the radius of a circle and the base radius and height of a cylinder. Thinking About What You See Why is it NOT a mistake to use the same name, for example radius, in different functions (and sometimes at the top level). Let s Make Some Mistakes In order to check our understanding, we will play around with the code and make some mistakes on purpose Removing pi 4
5 Changing the name of a function Switching the order of the parameters in a function call Making an error in our calculation Why Functions? We write code that is Easier to think about and write Easier to test: we can check the correctness of area_circle before we test area_cylinder. Clearer for someone else to read Reusable in other programs Together these define the notion of encapsulation, another important idea in computer science! Python s Built-In Functions A few examples, some of which we have already seen abs pow int float round max min Let s play around to see what they do! Summary Functions for encapsulation and reuse Function syntax Arguments, parameters and local variables Flow of control, including functions that call other functions Built-in functions 5
Introduction to Python
Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment
Basic Math for the Small Public Water Systems Operator
Basic Math for the Small Public Water Systems Operator Small Public Water Systems Technology Assistance Center Penn State Harrisburg Introduction Area In this module we will learn how to calculate the
Solids. Objective A: Volume of a Solids
Solids Math00 Objective A: Volume of a Solids Geometric solids are figures in space. Five common geometric solids are the rectangular solid, the sphere, the cylinder, the cone and the pyramid. A rectangular
Introduction to Python
WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language
Informatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
Perimeter, Area, and Volume
Perimeter, Area, and Volume Perimeter of Common Geometric Figures The perimeter of a geometric figure is defined as the distance around the outside of the figure. Perimeter is calculated by adding all
Surface Area Quick Review: CH 5
I hope you had an exceptional Christmas Break.. Now it's time to learn some more math!! :) Surface Area Quick Review: CH 5 Find the surface area of each of these shapes: 8 cm 12 cm 4cm 11 cm 7 cm Find
CS 100 Introduction to Computer Science Lab 1 - Playing with Python Due September 21/23, 11:55 PM
CS 100 Introduction to Computer Science Lab 1 - Playing with Python Due September 21/23, 11:55 PM First, a word about due dates. If you are in the Tuesday lab section, your assignment is due Monday night
Software Development. Topic 1 The Software Development Process
Software Development Topic 1 The Software Development Process 1 The Software Development Process Analysis Design Implementation Testing Documentation Evaluation Maintenance 2 Analysis Stage An Iterative
Calculating Area, Perimeter and Volume
Calculating Area, Perimeter and Volume You will be given a formula table to complete your math assessment; however, we strongly recommend that you memorize the following formulae which will be used regularly
Area of a triangle: The area of a triangle can be found with the following formula: 1. 2. 3. 12in
Area Review Area of a triangle: The area of a triangle can be found with the following formula: 1 A 2 bh or A bh 2 Solve: Find the area of each triangle. 1. 2. 3. 5in4in 11in 12in 9in 21in 14in 19in 13in
Math 0306 Final Exam Review
Math 006 Final Exam Review Problem Section Answers Whole Numbers 1. According to the 1990 census, the population of Nebraska is 1,8,8, the population of Nevada is 1,01,8, the population of New Hampshire
CSCE 110 Programming I Basics of Python: Variables, Expressions, and Input/Output
CSCE 110 Programming Basics of Python: Variables, Expressions, and nput/output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Fall 2011 Python Python was developed
Almost all spreadsheet programs are based on a simple concept: the malleable matrix.
MS EXCEL 2000 Spreadsheet Use, Formulas, Functions, References More than any other type of personal computer software, the spreadsheet has changed the way people do business. Spreadsheet software allows
Programming a mathematical formula. INF1100 Lectures, Chapter 1: Computing with Formulas. How to write and run the program.
5mm. Programming a mathematical formula INF1100 Lectures, Chapter 1: Computing with Formulas Hans Petter Langtangen We will learn programming through examples The first examples involve programming of
Using Excel to find Perimeter, Area & Volume
Using Excel to find Perimeter, Area & Volume Level: LBS 4 V = lwh Goal: To become familiar with Microsoft Excel by entering formulas into a spreadsheet in order to calculate the perimeter, area and volume
Mathematics Placement Examination (MPE)
Practice Problems for Mathematics Placement Eamination (MPE) Revised August, 04 When you come to New Meico State University, you may be asked to take the Mathematics Placement Eamination (MPE) Your inital
Python Programming: An Introduction to Computer Science
Python Programming: An Introduction to Computer Science Chapter 7 Decision Structures Python Programming, 1/e 1 Objectives To understand the programming pattern simple decision and its implementation using
Decision Logic: if, if else, switch, Boolean conditions and variables
CS 1044 roject 3 Fall 2009 Decision Logic: if, if else, switch, Boolean conditions and variables This programming assignment uses many of the ideas presented in sections 3 through 5 of the Dale/Weems text
Revision Notes Adult Numeracy Level 2
Revision Notes Adult Numeracy Level 2 Place Value The use of place value from earlier levels applies but is extended to all sizes of numbers. The values of columns are: Millions Hundred thousands Ten thousands
VOLUME of Rectangular Prisms Volume is the measure of occupied by a solid region.
Math 6 NOTES 7.5 Name VOLUME of Rectangular Prisms Volume is the measure of occupied by a solid region. **The formula for the volume of a rectangular prism is:** l = length w = width h = height Study Tip:
FEEG6002 - Applied Programming 5 - Tutorial Session
FEEG6002 - Applied Programming 5 - Tutorial Session Sam Sinayoko 2015-10-30 1 / 38 Outline Objectives Two common bugs General comments on style String formatting Questions? Summary 2 / 38 Objectives Revise
Introduction to Python for Text Analysis
Introduction to Python for Text Analysis Jennifer Pan Institute for Quantitative Social Science Harvard University (Political Science Methods Workshop, February 21 2014) *Much credit to Andy Hall and Learning
We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
The GED math test gives you a page of math formulas that
Math Smart 643 The GED Math Formulas The GED math test gives you a page of math formulas that you can use on the test, but just seeing the formulas doesn t do you any good. The important thing is understanding
Chapter 2 Writing Simple Programs
Chapter 2 Writing Simple Programs Charles Severance Textbook: Python Programming: An Introduction to Computer Science, John Zelle Software Development Process Figure out the problem - for simple problems
YOU MUST BE ABLE TO DO THE FOLLOWING PROBLEMS WITHOUT A CALCULATOR!
DETAILED SOLUTIONS AND CONCEPTS - SIMPLE GEOMETRIC FIGURES Prepared by Ingrid Stewart, Ph.D., College of Southern Nevada Please Send Questions and Comments to [email protected]. Thank you! YOU MUST
Florida Algebra 1 End-of-Course Assessment Item Bank, Polk County School District
Benchmark: MA.912.A.2.3; Describe the concept of a function, use function notation, determine whether a given relation is a function, and link equations to functions. Also assesses MA.912.A.2.13; Solve
12-1 Representations of Three-Dimensional Figures
Connect the dots on the isometric dot paper to represent the edges of the solid. Shade the tops of 12-1 Representations of Three-Dimensional Figures Use isometric dot paper to sketch each prism. 1. triangular
Chapter 3. Input and output. 3.1 The System class
Chapter 3 Input and output The programs we ve looked at so far just display messages, which doesn t involve a lot of real computation. This chapter will show you how to read input from the keyboard, use
MATHEMATICS FOR ENGINEERING BASIC ALGEBRA
MATHEMATICS FOR ENGINEERING BASIC ALGEBRA TUTORIAL 4 AREAS AND VOLUMES This is the one of a series of basic tutorials in mathematics aimed at beginners or anyone wanting to refresh themselves on fundamentals.
MAT 2170: Laboratory 3
MAT 2170: Laboratory 3 Key Concepts The purpose of this lab is to familiarize you with arithmetic expressions in Java. 1. Primitive Data Types int and double 2. Operations involving primitive data types,
CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.
TEST A CHAPTER 8, GEOMETRY 1. A rectangular plot of ground is to be enclosed with 180 yd of fencing. If the plot is twice as long as it is wide, what are its dimensions? 2. A 4 cm by 6 cm rectangle has
Area & Volume. 1. Surface Area to Volume Ratio
1 1. Surface Area to Volume Ratio Area & Volume For most cells, passage of all materials gases, food molecules, water, waste products, etc. in and out of the cell must occur through the plasma membrane.
CALCULATING THE AREA OF A FLOWER BED AND CALCULATING NUMBER OF PLANTS NEEDED
This resource has been produced as a result of a grant awarded by LSIS. The grant was made available through the Skills for Life Support Programme in 2010. The resource has been developed by (managers
Geometry - Calculating Area and Perimeter
Geometry - Calculating Area and Perimeter In order to complete any of mechanical trades assessments, you will need to memorize certain formulas. These are listed below: (The formulas for circle geometry
Algebra Geometry Glossary. 90 angle
lgebra Geometry Glossary 1) acute angle an angle less than 90 acute angle 90 angle 2) acute triangle a triangle where all angles are less than 90 3) adjacent angles angles that share a common leg Example:
GAP CLOSING. Volume and Surface Area. Intermediate / Senior Student Book
GAP CLOSING Volume and Surface Area Intermediate / Senior Student Book Volume and Surface Area Diagnostic...3 Volumes of Prisms...6 Volumes of Cylinders...13 Surface Areas of Prisms and Cylinders...18
Polymorphism. Problems with switch statement. Solution - use virtual functions (polymorphism) Polymorphism
Polymorphism Problems with switch statement Programmer may forget to test all possible cases in a switch. Tracking this down can be time consuming and error prone Solution - use virtual functions (polymorphism)
Show that when a circle is inscribed inside a square the diameter of the circle is the same length as the side of the square.
Week & Day Week 6 Day 1 Concept/Skill Perimeter of a square when given the radius of an inscribed circle Standard 7.MG:2.1 Use formulas routinely for finding the perimeter and area of basic twodimensional
Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June 2014. Dr.-Ing.
Computers An Introduction to Programming with Python CCHSG Visit June 2014 Dr.-Ing. Norbert Völker Many computing devices are embedded Can you think of computers/ computing devices you may have in your
Invitation to Ezhil : A Tamil Programming Language for Early Computer-Science Education 07/10/13
Invitation to Ezhil: A Tamil Programming Language for Early Computer-Science Education Abstract: Muthiah Annamalai, Ph.D. Boston, USA. Ezhil is a Tamil programming language with support for imperative
CS1020 Data Structures and Algorithms I Lecture Note #1. Introduction to Java
CS1020 Data Structures and Algorithms I Lecture Note #1 Introduction to Java Objectives Java Basic Java features C Java Translate C programs in CS1010 into Java programs 2 References Chapter 1 Section
CSC 120: Computer Science for the Sciences (R section)
CSC 120: Computer Science for the Sciences (R section) Radford M. Neal, University of Toronto, 2015 http://www.cs.utoronto.ca/ radford/csc120/ Week 2 Typing Stuff into R Can be Good... You can learn a
G r a d e 1 0 I n t r o d u c t i o n t o A p p l i e d a n d P r e - C a l c u l u s M a t h e m a t i c s ( 2 0 S ) Final Practice Exam
G r a d e 1 0 I n t r o d u c t i o n t o A p p l i e d a n d P r e - C a l c u l u s M a t h e m a t i c s ( 2 0 S ) Final Practice Exam G r a d e 1 0 I n t r o d u c t i o n t o A p p l i e d a n d
Chapter 8 Geometry We will discuss following concepts in this chapter.
Mat College Mathematics Updated on Nov 5, 009 Chapter 8 Geometry We will discuss following concepts in this chapter. Two Dimensional Geometry: Straight lines (parallel and perpendicular), Rays, Angles
What's New in ADP Reporting?
What's New in ADP Reporting? Welcome to the latest version of ADP Reporting! This release includes the following new features and enhancements. Use the links below to learn more about each one. What's
Area of a triangle: The area of a triangle can be found with the following formula: You can see why this works with the following diagrams:
Area Review Area of a triangle: The area of a triangle can be found with the following formula: 1 A 2 bh or A bh 2 You can see why this works with the following diagrams: h h b b Solve: Find the area of
General Software Development Standards and Guidelines Version 3.5
NATIONAL WEATHER SERVICE OFFICE of HYDROLOGIC DEVELOPMENT Science Infusion Software Engineering Process Group (SISEPG) General Software Development Standards and Guidelines 7/30/2007 Revision History Date
Course Title: Software Development
Course Title: Software Development Unit: Customer Service Content Standard(s) and Depth of 1. Analyze customer software needs and system requirements to design an information technology-based project plan.
Geometry Notes VOLUME AND SURFACE AREA
Volume and Surface Area Page 1 of 19 VOLUME AND SURFACE AREA Objectives: After completing this section, you should be able to do the following: Calculate the volume of given geometric figures. Calculate
Microsoft Windows PowerShell v2 For Administrators
Course 50414B: Microsoft Windows PowerShell v2 For Administrators Course Details Course Outline Module 1: Introduction to PowerShell the Basics This module explains how to install and configure PowerShell.
Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is
Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is preceded by an equal sign d. its name has undereline 2. Associations
Pizza! Pizza! Assessment
Pizza! Pizza! Assessment 1. A local pizza restaurant sends pizzas to the high school twelve to a carton. If the pizzas are one inch thick, what is the volume of the cylindrical shipping carton for the
Math 1B, lecture 5: area and volume
Math B, lecture 5: area and volume Nathan Pflueger 6 September 2 Introduction This lecture and the next will be concerned with the computation of areas of regions in the plane, and volumes of regions in
CSC 221: Computer Programming I. Fall 2011
CSC 221: Computer Programming I Fall 2011 Python control statements operator precedence importing modules random, math conditional execution: if, if-else, if-elif-else counter-driven repetition: for conditional
Java CPD (I) Frans Coenen Department of Computer Science
Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials
FCAT FLORIDA COMPREHENSIVE ASSESSMENT TEST. Mathematics Reference Sheets. Copyright Statement for this Assessment and Evaluation Services Publication
FCAT FLORIDA COMPREHENSIVE ASSESSMENT TEST Mathematics Reference Sheets Copyright Statement for this Assessment and Evaluation Services Publication Authorization for reproduction of this document is hereby
Name: Date: Period: PIZZA! PIZZA! Area of Circles and Squares Circumference and Perimeters Volume of Cylinders and Rectangular Prisms Comparing Cost
Name: Date: Period: PIZZA! PIZZA! Area of Circles and Squares Circumference and Perimeters Volume of Cylinders and Rectangular Prisms Comparing Cost Lesson One Day One: Area and Cost A. Area of Pizza Triplets
CSCI 1100 Computer Science 1 Homework 1 Calculations and Functions
CSCI 1100 Computer Science 1 Homework 1 Calculations and Functions Overview This homework is a combination of what was supposed to be Homeworks 1 and 2, and is worth 70 points toward your overall homework
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Overview Due Thursday, November 12th at 11:59pm Last updated
PYTHON Basics http://hetland.org/writing/instant-hacking.html
CWCS Workshop May 2009 PYTHON Basics http://hetland.org/writing/instant-hacking.html Python is an easy to learn, modern, interpreted, object-oriented programming language. It was designed to be as simple
Writing Simple Programs
Chapter 2 Writing Simple Programs Objectives To know the steps in an orderly software development process. To understand programs following the Input, Process, Output (IPO) pattern and be able to modify
Python Programming: An Introduction to Computer Science
Python Programming: An Introduction to Computer Science Chapter 1 Computers and Programs 1 The Universal Machine n A computer -- a machine that stores and manipulates information under the control of a
2013 Getting Started Guide
2013 Getting Started Guide The contents of this guide and accompanying exercises were originally created by Nemetschek Vectorworks, Inc. Vectorworks Fundamentals Getting Started Guide Created using: Vectorworks
Python Lists and Loops
WEEK THREE Python Lists and Loops You ve made it to Week 3, well done! Most programs need to keep track of a list (or collection) of things (e.g. names) at one time or another, and this week we ll show
ModuMath Basic Math Basic Math 1.1 - Naming Whole Numbers Basic Math 1.2 - The Number Line Basic Math 1.3 - Addition of Whole Numbers, Part I
ModuMath Basic Math Basic Math 1.1 - Naming Whole Numbers 1) Read whole numbers. 2) Write whole numbers in words. 3) Change whole numbers stated in words into decimal numeral form. 4) Write numerals in
LAB4 Making Classes and Objects
LAB4 Making Classes and Objects Objective The main objective of this lab is class creation, how its constructer creation, object creation and instantiation of objects. We will use the definition pane to
Creating and Using Databases with Microsoft Access
CHAPTER A Creating and Using Databases with Microsoft Access In this chapter, you will Use Access to explore a simple database Design and create a new database Create and use forms Create and use queries
CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic. Aaron Stevens 28 March 2011. Overview/Questions
CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic Aaron Stevens 28 March 2011 1 Overview/Questions Review: Programmability Why learn programming? What is a programming language?
Exercise 4 Learning Python language fundamentals
Exercise 4 Learning Python language fundamentals Work with numbers Python can be used as a powerful calculator. Practicing math calculations in Python will help you not only perform these tasks, but also
ECDL / ICDL Spreadsheets Syllabus Version 5.0
ECDL / ICDL Spreadsheets Syllabus Version 5.0 Purpose This document details the syllabus for ECDL / ICDL Spreadsheets. The syllabus describes, through learning outcomes, the knowledge and skills that a
CGN 3421 - Computer Methods
CGN 3421 - Computer Methods Class web site: www.ce.ufl.edu/~kgurl Class text books: Recommended as a reference Numerical Methods for Engineers, Chapra and Canale Fourth Edition, McGraw-Hill Class software:
2/1/2010. Background Why Python? Getting Our Feet Wet Comparing Python to Java Resources (Including a free textbook!) Hathaway Brown School
Practical Computer Science with Preview Background Why? Getting Our Feet Wet Comparing to Resources (Including a free textbook!) James M. Allen Hathaway Brown School [email protected] Background Hathaway
Area of Parallelograms, Triangles, and Trapezoids (pages 314 318)
Area of Parallelograms, Triangles, and Trapezoids (pages 34 38) Any side of a parallelogram or triangle can be used as a base. The altitude of a parallelogram is a line segment perpendicular to the base
Keystone National High School Placement Exam Math Level 1. Find the seventh term in the following sequence: 2, 6, 18, 54
1. Find the seventh term in the following sequence: 2, 6, 18, 54 2. Write a numerical expression for the verbal phrase. sixteen minus twelve divided by six Answer: b) 1458 Answer: d) 16 12 6 3. Evaluate
Computer Programming I & II*
Computer Programming I & II* Career Cluster Information Technology Course Code 10152 Prerequisite(s) Computer Applications, Introduction to Information Technology Careers (recommended), Computer Hardware
Double Integrals in Polar Coordinates
Double Integrals in Polar Coordinates. A flat plate is in the shape of the region in the first quadrant ling between the circles + and +. The densit of the plate at point, is + kilograms per square meter
Grade 6 FCAT 2.0 Mathematics Sample Questions
Grade FCAT. Mathematics Sample Questions The intent of these sample test materials is to orient teachers and students to the types of questions on FCAT. tests. By using these materials, students will become
High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)
High-Level Programming Languages Nell Dale & John Lewis (adaptation by Michael Goldwasser) Low-Level Languages What are disadvantages of low-level languages? (e.g., machine code or assembly code) Programming
16 Circles and Cylinders
16 Circles and Cylinders 16.1 Introduction to Circles In this section we consider the circle, looking at drawing circles and at the lines that split circles into different parts. A chord joins any two
Welcome to Introduction to programming in Python
Welcome to Introduction to programming in Python Suffolk One, Ipswich, 4:30 to 6:00 Tuesday Jan 14, Jan 21, Jan 28, Feb 11 Welcome Fire exits Toilets Refreshments 1 Learning objectives of the course An
Math. So we would say that the volume of this cube is: cubic units.
Math Volume and Surface Area Two numbers that are useful when we are dealing with 3 dimensional objects are the amount that the object can hold and the amount of material it would take to cover it. For
1. The volume of the object below is 186 cm 3. Calculate the Length of x. (a) 3.1 cm (b) 2.5 cm (c) 1.75 cm (d) 1.25 cm
Volume and Surface Area On the provincial exam students will need to use the formulas for volume and surface area of geometric solids to solve problems. These problems will not simply ask, Find the volume
HVAC FORMULAS. TON OF REFRIGERATION - The amount of heat required to melt a ton (2000 lbs.) of ice at 32 F. 288,000 BTU/24 hr. 12,000 BTU/hr.
HVAC FORMULAS TON OF REFRIGERATION - The amount of heat required to melt a ton (2000 lbs.) of ice at 32 F 288,000 BTU/24 hr. 12,000 BTU/hr. APPROXIMATELY 2 inches in Hg. (mercury) = 1 psi WORK = Force
Relational Database: Additional Operations on Relations; SQL
Relational Database: Additional Operations on Relations; SQL Greg Plaxton Theory in Programming Practice, Fall 2005 Department of Computer Science University of Texas at Austin Overview The course packet
Microsoft Word 2010. Quick Reference Guide. Union Institute & University
Microsoft Word 2010 Quick Reference Guide Union Institute & University Contents Using Word Help (F1)... 4 Window Contents:... 4 File tab... 4 Quick Access Toolbar... 5 Backstage View... 5 The Ribbon...
Programming Languages
Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately
ECE 341 Coding Standard
Page1 ECE 341 Coding Standard Professor Richard Wall University of Idaho Moscow, ID 83843-1023 [email protected] August 27, 2013 1. Motivation for Coding Standards The purpose of implementing a coding standard
Exercise 0. Although Python(x,y) comes already with a great variety of scientic Python packages, we might have to install additional dependencies:
Exercise 0 Deadline: None Computer Setup Windows Download Python(x,y) via http://code.google.com/p/pythonxy/wiki/downloads and install it. Make sure that before installation the installer does not complain
SA B 1 p where is the slant height of the pyramid. V 1 3 Bh. 3D Solids Pyramids and Cones. Surface Area and Volume of a Pyramid
Accelerated AAG 3D Solids Pyramids and Cones Name & Date Surface Area and Volume of a Pyramid The surface area of a regular pyramid is given by the formula SA B 1 p where is the slant height of the pyramid.
SURFACE AREA AND VOLUME
SURFACE AREA AND VOLUME In this unit, we will learn to find the surface area and volume of the following threedimensional solids:. Prisms. Pyramids 3. Cylinders 4. Cones It is assumed that the reader has
Profiling, debugging and testing with Python. Jonathan Bollback, Georg Rieckh and Jose Guzman
Profiling, debugging and testing with Python Jonathan Bollback, Georg Rieckh and Jose Guzman Overview 1.- Profiling 4 Profiling: timeit 5 Profiling: exercise 6 2.- Debugging 7 Debugging: pdb 8 Debugging:
University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python
Introduction Welcome to our Python sessions. University of Hull Department of Computer Science Wrestling with Python Week 01 Playing with Python Vsn. 1.0 Rob Miles 2013 Please follow the instructions carefully.
Think About This Situation
Think About This Situation A popular game held at fairs or parties is the jelly bean guessing contest. Someone fills a jar or other large transparent container with a known quantity of jelly beans and
Intro to scientific programming (with Python) Pietro Berkes, Brandeis University
Intro to scientific programming (with Python) Pietro Berkes, Brandeis University Next 4 lessons: Outline Scientific programming: best practices Classical learning (Hoepfield network) Probabilistic learning
Getting Started in Tinkercad
Getting Started in Tinkercad By Bonnie Roskes, 3DVinci Tinkercad is a fun, easy to use, web-based 3D design application. You don t need any design experience - Tinkercad can be used by anyone. In fact,
Basic tutorial for Dreamweaver CS5
Basic tutorial for Dreamweaver CS5 Creating a New Website: When you first open up Dreamweaver, a welcome screen introduces the user to some basic options to start creating websites. If you re going to
