Test 1 - Python Edition

Size: px
Start display at page:

Download "Test 1 - Python Edition"

Transcription

1 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Spring 2018 Test 1 - Python Edition Shaundra B. Daily & Michael R. Gustafson II NetID (please print): In keeping with the Community Standard, I have neither provided nor received any assistance on this test. I understand if it is later determined that I gave or received assistance, I will be brought before the Undergraduate Conduct Board and, if found responsible for academic dishonesty or academic contempt, fail the class. I also understand that I am not allowed to speak to anyone except the instructor about any aspect of this test until the instructor announces it is allowed. I understand if it is later determined that I did speak to another person about the test before the instructor said it was allowed, I will be brought before the Undergraduate Conduct Board and, if found responsible for academic dishonesty or academic contempt, fail the class. Signature: Notes You will be turning in each problem in a separate pile. Most of these problems will require working on additional pieces of paper - Make sure that you do not put work for more than any one problem on any one piece of paper. For this test, you will be turning in four different sets of work. Again, Please do not work on multiple problems on the same sheet of paper. Also - please do not put work for one problem on the back of another problem. Be sure your name and NetID show up on every page of the test. If you are including work on extra sheets of paper, put your name and NetID on each and be sure to staple them to the appropriate problem. Problems without names will incur at least a 25% penalty for the problem. Work must be down in dark ink and on only one side of the page. This first page should have your name, NetID, and signature on it. It should be stapled on top of and turned in with your submission for Problem I. Every other pile should have your test page on top followed by any previously blank paper used for that problem. You will not need and can not use a calculator on this test. You will be asked to write several lines of code on this test. Make sure what you write is Python code and not mathematics. Be very careful with any symbols you use. You do not need to put the honor code statement in your codes. The honor code statement on this page and your NetID on each problem stands in for that. You may assume that the following have been run for any code you write: import math as m import numpy as np import matplotlib. pyplot as plt If you specifically want to import things in a different way, you need to show that explicitly on each code.

2 Problem I: [25 pts.] The Basics - NOT IN PYTHON YET!!! See CS 101 tests, specifically first problems, for similar code.

3 Problem II: [25 pts.] Roll of the Dice Yahtzee is a popular game by Milton Bradley which involves rolling five six-sided dice, each with integers 1 through 6 represented, in the hopes of getting various combinations. In the actual game, you get up to three chances to make the best hand out of your five dice. This problem involves performing a statistical analysis of just the first roll of the dice and of the possibility of getting five of the same value in that first roll of the dice. You are going to write a script called count_fives that will start by asking the user how many total rolls to analyze. You must make sure the user gives you a single positive integer; in cases where the user gives an invalid input, you should have the program tell the user there was a problem and ask as many times as needed to get a valid input. You do not have to specify which rule(s) they broke. Once your program has a single valid positive integer, it will then proceed to simulate rolling five six-sided dice as many times as specified. The program must keep track separately of how many times the dice showed 5 1 s, how many times 5 2 s, etc., and then once all the rolls are complete, print that information in an aligned table. The table will also include a line with the total number of times a five of a kind was rolled and will print out the percentage of rolls for that. Here is an example run with the spaces clearly shown: Single positive integer, please: -1 Incorrect - a single positive integer, please: 2.3 Incorrect - a single positive integer, please: [1, 4] Incorrect - a single positive integer, please: Five of a kind count: 1: 15 2: 17 3: 13 4: 13 5: 12 6: 11 all: 81 (0.0810%) You can assume that the counts will never be above 999. As an aside, the probability of getting a five of a kind in one roll with five six-sided dice is or %. You should carefully think about the different steps needed for this program, come up with an efficient way to check for five of a kind, plan out how you are going to keep track of things, and perhaps even draw a picture or map of how your program will work before you start writing code. If you are unsure of how to do one part, skip it and write the next part of the code assuming the previous part works.

4 Problem III: [20 pts.] Voltage An engineer built an electric circuit by connecting a 9 V battery, through a switch, to a resistor and a capacitor. The engineer closed the switch (turned it on, so the battery was connected to the rest of the circuit) for a very long time and then starting taking measurements of the voltage across the capacitor. The engineer opened the switch (turned it off, so the battery was no longer connected) and waited for the capacitor voltage to drop to 5 V. At that point the engineer closed the switch again. Now the engineer wants to compare the measured values with the theoretical values for the capacitor voltage. The measured values are in a file called CapVoltage.dat that has two columns of information. The first column has the time at which a voltage was measured (relative to when the switch was opened - that is, time 0 was after the switch had been closed for a very long time). The second column has the capacitor voltage. Here is the start of the file: e e e e e e e e e e e e e e e e e e e e e+00 The analytical model for the voltage is given by: t < 0 9 v C (t) = 0 t < e t t e (t 0.58) Write code that will load the data and then make a single plot with two data sets - the original data plotted as black points and the analytical model plotted as a solid black line. The analytical model should have the same domain as the data and should use 1000 points to create the line. Give the graph labels, a grid, a title, and a legend as shown below and write the code to save it in a file called cap_plot.eps. Capacitor Voltage 9 8 Voltage, V Data Model Time, s Note: I have made the font sizes larger for clarity; you are not required to do that.

5 Problem IV: [15 pts.] The Kitchen Sink (1) Write a function called Re that takes three lists called (u, L, and ν, where ν is the Greek letter nu) and returns a list with the Reynolds number: Re = ul ν Note: Your function should work if the inputs are all lists that are the same length and should return a list of the same size. You may assume that the user calls the function correctly; for example: In [1]: Re([1], [2], [3]) Out[1]: [ ] In [2]: Re([1, 2, 3], [4, 5, 6], [7, 8, 9]) Out[2]: [ , 1.25, 2.0] (2) How many times will the following loop run, and what are the values of J, K, L, and M when it is finished? K=0; L=[]; M=1 for J in [[2,3], [1,4], [6,5]]: K += J[0] L = L+J M *= min(j) (3) Write a function called cone which can take up to two inputs and yields two outputs. The help file for it is: cone(r, h=none) cone Calculate the volume and surface area of a right circular cone (vol, sa) = cone(r, h) input: r = radius of the base of the cone (required) h = height of the cone (default = same as r) output: vol: volume of the cone sa: surface area of the cone The formulas are: vol = πr2 h 3 sa = πr 2 + πr r 2 + h 2 You may assume the inputs are valid. Once your function is written, also show the code you could use on the command line to calculate the volume and surface area of a cone of radius 3 and height 4 and store them in variables called the_volume and the_sa, respectively.

6 Problem V: [15 pts.] The Complete Surprise! The Maclaurin series calculation for the hyperbolic sin is given as: f(x) = sinh(x) = n=0 x 2n+1 (2n + 1)! Complete the following code segment for so_fun.m (modified from Chapra, Figure 4.2) so that your function satisfies all the requirements given in the comment at the top of the function, including handling the default cases: def so_fun(x, es=0.0001, maxit=50): ³³³ Maclaurin series of hyperbolic sin function so_fun(x,es,maxit) input: x = value at which series evaluated es = stopping criterion (default = ) maxit = maximum iterations (default = 50) output: fx = estimated value ea = approximate relative error (%) iter = number of iterations Based on IterMeth.m from Figure 4.2 on p. 105 of Applied Numerical Methods with MATLAB for Scientists and Engineers Steven C. Chapra, 4th Edition ³³³ You do not need to re-write the comments in your code!. Your program may assume that the user correctly enters a single value for x and that if the user also enters values for es and/or maxit that they are 1x1 as well. Note that this formula will generally converge for all values of x. Note: The first (n = 0) term is x. The first iteration solution is thus x when n = 0, while the second iteration would be the solution once the n = 1 term in the series is added (in this case, x + x 3 /3!). MATLAB has a built-in factorial command you may use.

Test 2 - Python Edition

Test 2 - Python Edition 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 13L Spring 218 Test 2 - Python Edition Shaundra B. Daily & Michael R. Gustafson II Name (please print): NetID (please print): In keeping with the Community

More information

Skills Quiz - Python Edition Solutions

Skills Quiz - Python Edition Solutions 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2017 Skills Quiz - Python Edition Solutions Michael R. Gustafson II Name (please print): NetID (please print): In keeping with the Community

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Skills Quiz. Rebecca A. Simmons and & Michael R.

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Skills Quiz. Rebecca A. Simmons and & Michael R. 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2014 Skills Quiz Rebecca A. Simmons and & Michael R. Gustafson II NET ID (please print): In keeping with the Community Standard, I have neither

More information

Skills Quiz - Python Edition Solutions

Skills Quiz - Python Edition Solutions 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2016 Skills Quiz - Python Edition Solutions Rebecca A. Simmons and & Michael R. Gustafson II Name (please print): NetID (please print): In

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & W. Neal Simmons Michael R.

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & W. Neal Simmons Michael R. 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 53L Fall 2007 Test I Rebecca A. Simmons & W. Neal Simmons Michael R. Gustafson II Name (please print) In keeping with the Community Standard, I have

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & Michael R. Gustafson II

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & Michael R. Gustafson II 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 53L Fall 2009 Test I Rebecca A. Simmons & Michael R. Gustafson II Name and NET ID (please print) In keeping with the Community Standard, I have neither

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 5-: Principles of Computing, Spring 28 Problem Set 8 (PS8) Due: Friday, March 3 by 2:3PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill in your answers:.

More information

Using the Matplotlib Library in Python 3

Using the Matplotlib Library in Python 3 Using the Matplotlib Library in Python 3 Matplotlib is a Python 2D plotting library that produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms.

More information

Math 124 Final Examination Winter 2015 !!! READ...INSTRUCTIONS...READ!!!

Math 124 Final Examination Winter 2015 !!! READ...INSTRUCTIONS...READ!!! 1 Math 124 Final Examination Winter 2015 Print Your Name Signature Student ID Number Quiz Section Professor s Name TA s Name!!! READ...INSTRUCTIONS...READ!!! 1. Your exam contains 7 problems and 11 pages;

More information

General Certificate of Secondary Education Higher Tier June 2014

General Certificate of Secondary Education Higher Tier June 2014 Centre Number Surname Candidate Number For Examiner s Use Other Names Candidate Signature Examiner s Initials Pages Mark Mathematics General Certificate of Secondary Education Higher Tier June 2014 43603H

More information

Without fully opening the exam, check that you have pages 1 through 11.

Without fully opening the exam, check that you have pages 1 through 11. Name: Section: Recitation Instructor: INSTRUCTIONS Fill in your name, etc. on this first page. Without fully opening the exam, check that you have pages 1 through 11. Show all your work on the standard

More information

LAB 2: DATA FILTERING AND NOISE REDUCTION

LAB 2: DATA FILTERING AND NOISE REDUCTION NAME: LAB TIME: LAB 2: DATA FILTERING AND NOISE REDUCTION In this exercise, you will use Microsoft Excel to generate several synthetic data sets based on a simplified model of daily high temperatures in

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

THIS IS A LEGACY SPECIFICATION GCSE MATHEMATICS C (GRADUATED ASSESSMENT)

THIS IS A LEGACY SPECIFICATION GCSE MATHEMATICS C (GRADUATED ASSESSMENT) THIS IS A LEGACY SPECIFICATION M10 Monday 16 January 2012 Morning GCSE MATHEMATICS C (GRADUATED ASSESSMENT) B280B MODULE M10 SECTION B *B216600112* Candidates answer on the Question Paper. OCR supplied

More information

Matplotlib Python Plotting

Matplotlib Python Plotting Matplotlib Python Plotting 1 / 6 2 / 6 3 / 6 Matplotlib Python Plotting Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive

More information

Problem Possible Points Points Earned Problem Possible Points Points Earned Test Total 100

Problem Possible Points Points Earned Problem Possible Points Points Earned Test Total 100 MATH 1080 Test 2-Version A Fall 2015 Student s Printed Name: Instructor: Section # : You are not allowed to use any textbook, notes, cell phone, laptop, PDA, or any technology on any portion of this test.

More information

Bi 1x Spring 2014: Plotting and linear regression

Bi 1x Spring 2014: Plotting and linear regression Bi 1x Spring 2014: Plotting and linear regression In this tutorial, we will learn some basics of how to plot experimental data. We will also learn how to perform linear regressions to get parameter estimates.

More information

CS 111X - Spring Final Exam - KEY

CS 111X - Spring Final Exam - KEY CS 111X - Spring 2016 - Final Exam 1/10 Computing ID: CS 111X - Spring 2016 - Final Exam - KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance on

More information

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota Questions to:

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota   Questions to: Lab_B.nb Lab B Parametrizing Surfaces Math 37 University of Minnesota http://www.math.umn.edu/math37 Questions to: rogness@math.umn.edu Introduction As in last week s lab, there is no calculus in this

More information

Surface Area and Volume

Surface Area and Volume Surface Area and Volume Day 1 - Surface Area of Prisms Surface Area = The total area of the surface of a three-dimensional object (Or think of it as the amount of paper you ll need to wrap the shape.)

More information

Lab 4: Structured Programming I

Lab 4: Structured Programming I 4.1 Introduction Lab 4: Structured Programming I Lab this week is going to focus on selective structures and functions. 4.2 Resources The additional resources required for this assignment include: 0 Books:

More information

ENGR (Socolofsky) Week 07 Python scripts

ENGR (Socolofsky) Week 07 Python scripts ENGR 102-213 (Socolofsky) Week 07 Python scripts A couple programming examples for this week are embedded in the lecture notes for Week 7. We repeat these here as brief examples of typical array-like operations

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) =

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) = 7.1 What is x cos x? 1. Fill in the right hand side of the following equation by taking the derivative: (x sin x = 2. Integrate both sides of the equation. Instructor: When instructing students to integrate

More information

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education. Paper 4 (Extended) May/June 2004

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education. Paper 4 (Extended) May/June 2004 UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education MATHEMATICS 0580/04 0581/04 www.xtremepapers.com Paper 4 (Extended) May/June 2004 Additional

More information

Computer Science II Spring 2018 Final Exam Instructor: Arup Guha Date: 5/1/2018. Name:

Computer Science II Spring 2018 Final Exam Instructor: Arup Guha Date: 5/1/2018. Name: Computer Science II Spring 2018 Final Exam Instructor: Arup Guha Date: 5/1/2018 Name: 1) (15 pts) In two guest lectures, Dr. Ewetz described an open problem dealing with rectangle packing. A single packing

More information

Math 52 - Fall Final Exam PART 1

Math 52 - Fall Final Exam PART 1 Math 52 - Fall 2013 - Final Exam PART 1 Name: Student ID: Signature: Instructions: Print your name and student ID number and write your signature to indicate that you accept the Honor Code. This exam consists

More information

General Certificate of Secondary Education Higher Tier November Time allowed 1 hour 30 minutes

General Certificate of Secondary Education Higher Tier November Time allowed 1 hour 30 minutes Centre Number Surname Candidate Number For Examiner s Use Other Names Candidate Signature Examiner s Initials Pages Mark Mathematics General Certificate of Secondary Education Higher Tier November 2014

More information

LAB 2: DATA FILTERING AND NOISE REDUCTION

LAB 2: DATA FILTERING AND NOISE REDUCTION NAME: LAB SECTION: LAB 2: DATA FILTERING AND NOISE REDUCTION In this exercise, you will use Microsoft Excel to generate several synthetic data sets based on a simplified model of daily high temperatures

More information

Test 2 Version A. On my honor, I have neither given nor received inappropriate or unauthorized information at any time before or during this test.

Test 2 Version A. On my honor, I have neither given nor received inappropriate or unauthorized information at any time before or during this test. Student s Printed Name: Instructor: CUID: Section: Instructions: You are not permitted to use a calculator on any portion of this test. You are not allowed to use any textbook, notes, cell phone, laptop,

More information

Section 2 0: The Rectangular Coordinate System. The Coordinate System

Section 2 0: The Rectangular Coordinate System. The Coordinate System Section 2 : The Rectangular Coordinate System The rectangular coordinate system is based on two number lines. A horizontal line called the x axis and a vertical line called the y axis. Each axis has marks

More information

Math Homework 3

Math Homework 3 Math 0 - Homework 3 Due: Friday Feb. in class. Write on your paper the lab section you have registered for.. Staple the sheets together.. Solve exercise 8. of the textbook : Consider the following data:

More information

CS150 Sample Final. Name: Section: A / B

CS150 Sample Final. Name: Section: A / B CS150 Sample Final Name: Section: A / B Date: Start time: End time: Honor Code: Signature: This exam is closed book, closed notes, closed computer, closed calculator, etc. You may only use (1) the final

More information

Objectives: - You need to be able to use the two equations above and the series and parallel circuit rules.

Objectives: - You need to be able to use the two equations above and the series and parallel circuit rules. F: Solve Complete Circuits Level 3 Prerequisite: Solve Ohm s Law and the Power Formula Points To: Solve Complete Circuit with Nontraditional Information Objectives: V = IR P = IV - Given a battery and

More information

CS150 Sample Final Solution

CS150 Sample Final Solution CS150 Sample Final Solution Name: Section: A / B Date: Start time: End time: Honor Code: Signature: This exam is closed book, closed notes, closed computer, closed calculator, etc. You may only use (1)

More information

: Intro Programming for Scientists and Engineers Final Exam

: Intro Programming for Scientists and Engineers Final Exam Final Exam Page 1 of 6 600.112: Intro Programming for Scientists and Engineers Final Exam Peter H. Fröhlich phf@cs.jhu.edu December 20, 2012 Time: 40 Minutes Start here: Please fill in the following important

More information

What is Simulink. >>simulink

What is Simulink. >>simulink MATLAB Simulink What is Simulink Simulink is an input/output device GUI block diagram simulator. Simulink contains a Library Editor of tools from which we can build input/output devices and continuous

More information

10.4 Linear interpolation method Newton s method

10.4 Linear interpolation method Newton s method 10.4 Linear interpolation method The next best thing one can do is the linear interpolation method, also known as the double false position method. This method works similarly to the bisection method by

More information

My Notes CONNECT TO SCIENCE. Horticulture is the science and art of growing fruit, flowers, ornamental plants, and vegetables.

My Notes CONNECT TO SCIENCE. Horticulture is the science and art of growing fruit, flowers, ornamental plants, and vegetables. SUGGESTED LEARNING STRATEGIES: Summarize/Paraphrase/ Retell, Use Manipulatives, Activating Prior Knowledge, Self/ Peer Revision The Horticulture Club has been given some land to build a greenhouse. The

More information

Class #15: Experiment Introduction to Matlab

Class #15: Experiment Introduction to Matlab Class #15: Experiment Introduction to Matlab Purpose: The objective of this experiment is to begin to use Matlab in our analysis of signals, circuits, etc. Background: Before doing this experiment, students

More information

Math 250A (Fall 2009) - Lab I: Estimate Integrals Numerically with Matlab. Due Date: Monday, September 21, INSTRUCTIONS

Math 250A (Fall 2009) - Lab I: Estimate Integrals Numerically with Matlab. Due Date: Monday, September 21, INSTRUCTIONS Math 250A (Fall 2009) - Lab I: Estimate Integrals Numerically with Matlab Due Date: Monday, September 21, 2009 4:30 PM 1. INSTRUCTIONS The primary purpose of this lab is to understand how go about numerically

More information

EECS 492 Midterm #1. Example Questions. Note: Not a complete exam!

EECS 492 Midterm #1. Example Questions. Note: Not a complete exam! EECS 492 Midterm #1 Example Questions Note: Not a complete exam! General Instructions This exam is closed book, except that you are allowed to refer to a single sheet of paper. You may use a calculator

More information

Statement of integrity: I did not, and will not, violate the rules of academic integrity on this exam.

Statement of integrity: I did not, and will not, violate the rules of academic integrity on this exam. CS100M Fall 2007 Prelim 2 CIS121 Final Exam Oct 16 7:30 9:00pm Name: (Legibly print last name, first name, middle name) NetID: Statement of integrity: I did not, and will not, violate the rules of academic

More information

Indicate the option which most accurately completes the sentence.

Indicate the option which most accurately completes the sentence. Discrete Structures, CSCI 246, Fall 2015 Final, Dec. 10 Indicate the option which most accurately completes the sentence. 1. Say that Discrete(x) means that x is a discrete structures exam and Well(x)

More information

CCNY Math Review Chapter 2: Functions

CCNY Math Review Chapter 2: Functions CCN Math Review Chapter : Functions Section.1: Functions.1.1: How functions are used.1.: Methods for defining functions.1.3: The graph of a function.1.: Domain and range.1.5: Relations, functions, and

More information

EMERGENCY SHELTER DESIGN STEM LEARNING AT ITS BEST

EMERGENCY SHELTER DESIGN STEM LEARNING AT ITS BEST KSB * 1 ( * KNOWLEDGE AND SKILL BUILDER) Geometric shapes student Name: Period: school: date: Hofstra University Center for Technological Literacy Simulations and Modeling for Technology Education This

More information

Setting up Python 3.5 and numpy and matplotlib on your own Windows PC or laptop

Setting up Python 3.5 and numpy and matplotlib on your own Windows PC or laptop CS-1004, Introduction to Programming for Non-Majors, C-Term 2017 Setting up Python 3.5 and numpy and matplotlib on your own Windows PC or laptop Hugh C. Lauer Adjunct Professor Worcester Polytechnic Institute

More information

(Refer Slide Time: 01:25)

(Refer Slide Time: 01:25) Computer Architecture Prof. Anshul Kumar Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 32 Memory Hierarchy: Virtual Memory (contd.) We have discussed virtual

More information

Math 3820 Project. 1 Typeset or handwritten? Guidelines

Math 3820 Project. 1 Typeset or handwritten? Guidelines Math 3820 Project Guidelines Abstract These are some recommendations concerning the projects in Math 3820. 1 Typeset or handwritten? Although handwritten reports will be accepted, I strongly recommended

More information

Program Proposal for a Direct Converted Program. BS in COMPUTER SCIENCE

Program Proposal for a Direct Converted Program. BS in COMPUTER SCIENCE Program Proposal for a Direct Converted Program BS in COMPUTER SCIENCE Document Page number Curriculum Sheet p. 2 p. -year Roadmap p. p. 5 Two Year Course Schedule p. 6 (2018 2019 AY and 2019 2020 AY)

More information

MATH 104 First Midterm Exam - Fall (d) A solid has as its base the region in the xy-plane the region between the curve y = 1 x2

MATH 104 First Midterm Exam - Fall (d) A solid has as its base the region in the xy-plane the region between the curve y = 1 x2 MATH 14 First Midterm Exam - Fall 214 1. Find the area between the graphs of y = x 2 + x + 5 and y = 2x 2 x. 1. Find the area between the graphs of y = x 2 + 4x + 6 and y = 2x 2 x. 1. Find the area between

More information

Math 52 Final Exam March 16, 2009

Math 52 Final Exam March 16, 2009 Math 52 Final Exam March 16, 2009 Name : Section Leader: Josh Lan Xiannan (Circle one) Genauer Huang Li Section Time: 10:00 11:00 1:15 2:15 (Circle one) This is a closed-book, closed-notes exam. No calculators

More information

Developmental Math An Open Program Unit 7 Geometry First Edition

Developmental Math An Open Program Unit 7 Geometry First Edition Developmental Math An Open Program Unit 7 Geometry First Edition Lesson 1 Basic Geometric Concepts and Figures TOPICS 7.1.1 Figures in 1 and 2 Dimensions 1 Identify and define points, lines, line segments,

More information

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves Block #1: Vector-Valued Functions Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves 1 The Calculus of Moving Objects Problem.

More information

Continental Mathematics League

Continental Mathematics League Continental Mathematics League 2015-2016 Computer Science Contest Grades 3-5 The contest consists of three meets. Each meet has six questions for 30 minutes. Note: Some questions have multiple answers.

More information

Euler s Method with Python

Euler s Method with Python Euler s Method with Python Intro. to Differential Equations October 23, 2017 1 Euler s Method with Python 1.1 Euler s Method We first recall Euler s method for numerically approximating the solution of

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

PROGRAMMING FUNDAMENTALS

PROGRAMMING FUNDAMENTALS PROGRAMMING FUNDAMENTALS VARIABLES, EXPRESSIONS AND STATEMENTS João Correia Lopes INESC TEC, FEUP 27 September 2018 FPRO/MIEIC/2018-19 27/09/2018 1 / 21 INTRODUCTION GOALS By the end of this class, the

More information

CS 111X - Fall Test 1

CS 111X - Fall Test 1 CS 111X - Fall 2016 - Test 1 1/9 Computing ID: CS 111X - Fall 2016 - Test 1 Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance on this exam. Signature:

More information

CS220/MATH320 Applied Discrete Mathematics Instructor: Marc Pomplun Practice Exam. Sample Solutions

CS220/MATH320 Applied Discrete Mathematics Instructor: Marc Pomplun Practice Exam. Sample Solutions CS220/MATH320 Applied Discrete Mathematics Instructor: Marc Pomplun Practice Exam Sample Solutions Question 1: Cardinality How many distinct elements does the set S contain in each case? Check the appropriate

More information

Mathematics Background

Mathematics Background Measurement All measurements are approximations. In their work in this Unit, students explore ways to find measures for two and three dimensional figures. Even using exact formulas depends on how students

More information

Spring 2017 CS 1110/1111 Exam 1

Spring 2017 CS 1110/1111 Exam 1 CS 1110/1111 Spring 2017 Exam 1 page 1 of 6 Spring 2017 CS 1110/1111 Exam 1 Bubble in your computing ID in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly.

More information

User-Defined Function

User-Defined Function ENGR 102-213 (Socolofsky) Week 11 Python scripts In the lecture this week, we are continuing to learn powerful things that can be done with userdefined functions. In several of the examples, we consider

More information

HW0 v3. October 2, CSE 252A Computer Vision I Fall Assignment 0

HW0 v3. October 2, CSE 252A Computer Vision I Fall Assignment 0 HW0 v3 October 2, 2018 1 CSE 252A Computer Vision I Fall 2018 - Assignment 0 1.0.1 Instructor: David Kriegman 1.0.2 Assignment Published On: Tuesday, October 2, 2018 1.0.3 Due On: Tuesday, October 9, 2018

More information

Grades 7 & 8, Math Circles 20/21/22 February, D Geometry Solutions

Grades 7 & 8, Math Circles 20/21/22 February, D Geometry Solutions Faculty of Mathematics Waterloo, Ontario NL 3G1 Centre for Education in Mathematics and Computing D Geometry Review Grades 7 & 8, Math Circles 0/1/ February, 018 3D Geometry Solutions Two-dimensional shapes

More information

MATLAB Coding Style. The acronym ASAP stands either for as short as possible, or as small as possible, or both, depending on context.

MATLAB Coding Style. The acronym ASAP stands either for as short as possible, or as small as possible, or both, depending on context. MATLAB Coding Style To stipulate the provision of spaces, we use the following terminology. Space-followed means followed by a space. For example, commas are space-followed means that every comma must

More information

Assignment 4: Due Friday Mar 11 at 6pm

Assignment 4: Due Friday Mar 11 at 6pm CS1110 Spring 2016 Assignment 4: Due Friday Mar 11 at 6pm You must work either on your own or with one partner. If you work with a partner, you and your partner must first register as a group in CMS (this

More information

CS 1301 Exam 1 Spring 2014

CS 1301 Exam 1 Spring 2014 CS 1301 Exam 1 Spring 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam

More information

End-of-Module Assessment Task

End-of-Module Assessment Task Name Date 1. The juice box pictured below is 4 inches high, 3 inches long, and 2 inches wide. a. In the grid above, the distance between grid lines represents one inch. Use the grid paper to sketch the

More information

Foundations of Math II

Foundations of Math II Foundations of Math II Unit 6b: Toolkit Functions Academics High School Mathematics 6.6 Warm Up: Review Graphing Linear, Exponential, and Quadratic Functions 2 6.6 Lesson Handout: Linear, Exponential,

More information

Grades 7 & 8, Math Circles 20/21/22 February, D Geometry

Grades 7 & 8, Math Circles 20/21/22 February, D Geometry Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing 2D Geometry Review Grades 7 & 8, Math Circles 20/21/22 February, 2018 3D Geometry Two-dimensional shapes

More information

Clustering Images. John Burkardt (ARC/ICAM) Virginia Tech... Math/CS 4414:

Clustering Images. John Burkardt (ARC/ICAM) Virginia Tech... Math/CS 4414: John (ARC/ICAM) Virginia Tech... Math/CS 4414: http://people.sc.fsu.edu/ jburkardt/presentations/ clustering images.pdf... ARC: Advanced Research Computing ICAM: Interdisciplinary Center for Applied Mathematics

More information

Nets of Three-Dimensional Objects

Nets of Three-Dimensional Objects Nets of Three-Dimensional Objects Focus on After this lesson, you will be able to... determine the correct nets for 3-D objects build 3-D objects from nets draw nets for 3-D objects rectangular prism a

More information

MS6021 Scientific Computing. MatLab and Python for Mathematical Modelling. Aimed at the absolute beginner.

MS6021 Scientific Computing. MatLab and Python for Mathematical Modelling. Aimed at the absolute beginner. MS6021 Scientific Computing MatLab and Python for Mathematical Modelling. Aimed at the absolute beginner. Natalia Kopteva Email: natalia.kopteva@ul.ie Web: http://www.staff.ul.ie/natalia/ Room: B2037 Office

More information

Lab 5: Program Control and Functions

Lab 5: Program Control and Functions EGR 53L - Spring 2010 Lab 5: Program Control and Functions 5.1 Introduction Lab this week is going to focus on structured programming, specifically using logic and selective structures to control program

More information

Math 124 Final Examination Winter 2016 !!! READ...INSTRUCTIONS...READ!!!

Math 124 Final Examination Winter 2016 !!! READ...INSTRUCTIONS...READ!!! Math 124 Final Examination Winter 2016 Print Your Name Signature Student ID Number Quiz Section Professor s Name TA s Name!!! READ...INSTRUCTIONS...READ!!! 1. Your exam contains 7 problems and 9 pages;

More information

GEOMETRY SUMMER 2016 PRACTICE FINAL EXAM

GEOMETRY SUMMER 2016 PRACTICE FINAL EXAM GEOMETRY SUMMER 2016 PRACTICE FINAL EXAM Name: Instructions: 1. Show all work on the test itself for every problem. Partial credit is better than no credit. 2. Instructions have been provided for each

More information

6 th Grade Math Cylinder Task. c) Draw a net (pattern) for the manufacturer to use to make the can.

6 th Grade Math Cylinder Task. c) Draw a net (pattern) for the manufacturer to use to make the can. 6 th Grade Math a) Explain what is meant by surface area. What steps would you take to find the surface area of a cylinder? b) One of the major expenses in manufacturing a can is the amount of metal that

More information

The Skyline Design Challenge

The Skyline Design Challenge The Skyline Design Challenge An island named Willingdon has just been human-made. The president of the island is searching for young, creative, and brilliant architects who can build a city in Willingdon.

More information

This is a one-week excerpt from the Starfall Kindergarten Mathematics Teacher s Guide. If you have questions or comments, please contact us.

This is a one-week excerpt from the Starfall Kindergarten Mathematics Teacher s Guide. If you have questions or comments, please contact us. UNIT 6 WEEK 13 This is a one-week excerpt from the Starfall Kindergarten Mathematics Teacher s Guide. If you have questions or comments, please contact us. Email: helpdesk@starfall.com Phone: 1-888-857-8990

More information

UNIT 19 Similarity Lesson Plan 1

UNIT 19 Similarity Lesson Plan 1 UNIT 19 Similarity Lesson Plan 1 Enlargements 1A 1B Introducing 'enlargement' PB 19.1, Worked Example 1 (changed) T: I am planning to build a cupboard in a corner of my kitchen. I've drawn a plan of the

More information

Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter

Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter Matter & Motion Winter 2017 18 Name: Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter Goals: 1. Practice

More information

CS 1301 Exam 1 Spring 2014

CS 1301 Exam 1 Spring 2014 CS 1301 Exam 1 Spring 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam

More information

CS 2506 Computer Organization II

CS 2506 Computer Organization II Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted one-page formula sheet. No calculators or other computing devices may

More information

Introduction to Scientific Computing with Python, part two.

Introduction to Scientific Computing with Python, part two. Introduction to Scientific Computing with Python, part two. M. Emmett Department of Mathematics University of North Carolina at Chapel Hill June 20 2012 The Zen of Python zen of python... fire up python

More information

ENGR Fall Exam 1

ENGR Fall Exam 1 ENGR 13100 Fall 2012 Exam 1 INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully.

More information

San José State University Computer Science CS 122 Advanced Python Programming Spring 2018

San José State University Computer Science CS 122 Advanced Python Programming Spring 2018 Course and Contact Information San José State University Computer Science CS 122 Advanced Python Programming Spring 2018 Instructor: Office Location: Telephone: Email: Office Hours: Class Days/Time: Classroom:

More information

Computational Mathematics/Information Technology. Worksheet 2 Iteration and Excel

Computational Mathematics/Information Technology. Worksheet 2 Iteration and Excel Computational Mathematics/Information Technology Worksheet 2 Iteration and Excel This sheet uses Excel and the method of iteration to solve the problem f(x) = 0. It introduces user functions and self referencing

More information

Project 1 - Battleship Game

Project 1 - Battleship Game Project 1 - Battleship Game Minimal Submission Due: Friday, December 22 th, 2006 Revision History Final Project Due: Sunday, January 21 th, 2007 Dec 7th, 2006, v1.0: Initial revision for faculty review.

More information

CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY

CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY CS 111X - Fall 2016 - Test 1 1/9 Computing ID: CS 111X - Fall 2016 - Test 1 - KEY KEY KEY KEY KEY KEY KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance

More information

CSCE 110 Programming I

CSCE 110 Programming I CSCE 110 Programming I Simulations and Plotting Data Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Spring 2014 Tiffani L. Williams (Texas A&M) CSCE 110) Spring

More information

CS 051 Homework Laboratory #2

CS 051 Homework Laboratory #2 CS 051 Homework Laboratory #2 Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing many students have to figure out for the first time when they come to college is how

More information

3 ADT Implementation in Java

3 ADT Implementation in Java Object-Oriented Design Lecture 3 CS 3500 Spring 2010 (Pucella) Tuesday, Jan 19, 2010 3 ADT Implementation in Java Last time, we defined an ADT via a signature and a specification. We noted that the job

More information

Setting up Python 3.4 and numpy and matplotlib on your own Windows PC or laptop

Setting up Python 3.4 and numpy and matplotlib on your own Windows PC or laptop CS-1004, Introduction to Programming for Non-Majors, A-Term 2015 Setting up Python 3.4 and numpy and matplotlib on your own Windows PC or laptop Hugh C. Lauer Adjunct Professor Worcester Polytechnic Institute

More information

CS 1301 Exam 1 Fall 2010

CS 1301 Exam 1 Fall 2010 CS 1301 Exam 1 Fall 2010 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in

More information

MATH 2221 A Mathematics Laboratory II

MATH 2221 A Mathematics Laboratory II MATH 2221 A Mathematics Laboratory II Lab Assignment 7 Name: Student ID.: In this assignment, you are asked to run MATLAB demos to see MATLAB at work. The color version of this assignment can be found

More information

Self Sustaining Arduino

Self Sustaining Arduino Description This document is a tutorial for creating a self sustaining Arduino board, by harnessing solar energy. It would be incorporated with a rechargeable 9V battery. What makes this unique is that

More information

Object-Oriented Design Lecture 21 CSU 370 Fall 2008 (Pucella) Tuesday, Dec 9, 2007

Object-Oriented Design Lecture 21 CSU 370 Fall 2008 (Pucella) Tuesday, Dec 9, 2007 Object-Oriented Design Lecture 21 CSU 370 Fall 2008 (Pucella) Tuesday, Dec 9, 2007 Odds and Ends In this lecture, I want to touch on a number of topics that are intrinsically useful, but that we do not

More information

Mathematics Second Practice Test 2 Levels 6-8 Calculator allowed

Mathematics Second Practice Test 2 Levels 6-8 Calculator allowed Mathematics Second Practice Test 2 Levels 6-8 Calculator allowed Please read this page, but do not open your booklet until your teacher tells you to start. Write your name and the name of your school in

More information

CS 1044 Program 6 Summer I dimension ??????

CS 1044 Program 6 Summer I dimension ?????? Managing a simple array: Validating Array Indices Most interesting programs deal with considerable amounts of data, and must store much, or all, of that data on one time. The simplest effective means for

More information