Name CptS 111, Spring 2018 Programming Assignment #5 Date Name of program Brief description and/or purpose of the program; include sources
|
|
- Chad Wade
- 6 years ago
- Views:
Transcription
1 CptS 111 PA #5 Due Tuesday, Mar. 20, 2018 for-loops, FIBONACCI, AND A STATISTICS PROGRAM This assignment has two parts and isn t nearly as formidable as it looks (although you shouldn t wait until the last minute to start it). In the first part you ll have some fun with the Fibonacci sequence, and in the second part you ll actually create a statistics program you can use instead of your calculator (just joking). You must include a docstring in each function, use comments, and make your program readable by using whitespace effectively. You will be graded on all these aspects, not just on whether your programs run correctly. Header information. Your program must include the following information in the header. Name CptS 111, Spring 2018 Programming Assignment #5 Date Name of program Brief description and/or purpose of the program; include sources The Fibonacci Sequence and the Golden Ratio Believe it or not, the golden ratio has been used to predict trends in the stock market and for other applications in financial analysis. The golden ratio and the Fibonacci sequence are related, and both seem to reflect a basic law of nature which you can read about here. The relationship is given by F(n+1) lim = φ n F(n) wheref(n) is thenth term in the Fibonacci sequence and φ is the golden ratio given by φ = For large values of n, you can find the approximate value of the next term in the Fibonacci sequence by multiplying the current term by the golden ratio. You may recall that the exact Fibonacci sequence is obtained by adding two successive terms to get the next term: i.e.,1+1 = 2, 1+2 = 3,2+3 = 5, and so on. The Fibonacci spiral shown here: 1
2 is constructed by representing each term of the Fibonacci sequence by a square with sides equal to the value of the term. First you draw two squares with sides of length 1 next to each other; you add a square with sides of length 2 adjacent to the original two squares; next you add a square with sides of length 3 adajacent to the three existing squares, and so on. After you have as many boxes as you wish, you draw quarter-circle arcs through each adjacent square and voila! Approximations of Fibonacci spirals show up in nature all the time as seen in the next two images of a snail shell and Hurricane Irene: For part 1 of this assignment, we re going to approximate the golden ratio using successive terms of the Fibonacci sequence. To begin we must first convert the sequence shown above into a mathematical formula. We write: x n+1 = x n +x n 1 (1) Don t be intimidated by this formula. It simply states that the next value in the sequence relative to thenth term is the sum of thenth term and then 1th term. We can seed the sequence by starting with the first two terms to obtain the third: x 2 = x 1 +x 0 2 = 1+1 2
3 How do you write an algorithm to implement Eq. (1) and then generate a given number of terms in the Fibonacci sequence? Imagine there s a window just wide enough for you to see spaces for three terms in the sequence as shown in the figure below. When you align this window with the three spaces, the first and second numbers are known, and it s easy to determine the third number: simply add the first and second numbers. Next push the window to the right one space so that the new first number previously was the second number and the new second number previously was the third. Once again the first and second numbers in the window are known. Add them to obtain the third number. You can repeat this to determine as many number of terms as you want. first second third 1, 1,?,... first second third 1, 1, 2,?,... first second third 1, 1, 2, 3,?,... Next, consider the following code. It prints the first 10 numbers of the Fibonacci sequence 11 with the starting valuex 0. 1 # seed the starting values 2 first = 1 # x_0 3 print(first) # print the starting value, x_0 4 second = 1 # x_1 5 for i in range(10): # execute loop 10 times 6 print(second) # print current second value 7 third = first + second # set third to the next number in the series 8 first = second # set first to previous second value 9 second = third # set second to previous third value The window we imagined above is represented by three variables: first, second, and third. We set first and second to one. After we ve initialized first, we print its value before entering the for-loop. In the for-loop, the value of second is printed, and the next number in the sequence is calculated and assigned to the variable third. Next the first and second variables are reset, 3
4 which is just like moving our window to the right one space. (This can be coded more pythonically using simultaneous assignment which is when you use a, b = x, y.) Now look at the code and the window figure and make sure you understand both before continuing on to the actual programming assignment! Program Requirements For part 1, you must write a single program calledgold ratio.py with two functions: fib(): Takes a single integer argumentnum terms greater than or equal to 1 and for each of thenum terms terms of the Fibonacci sequence prints 1) the number of the term i.e., 1, 2, 3..., 2) the corresponding Fibonacci number, and 3) the ratio of the current and previous Fibonacci numbers as shown below. The ratio, printed only forx 1 and higher, is an approximation of the golden ratioφ = main(): Prompts the user for the number of terms s/he wants to find and calls the void function fib(). The program gives the following output (with input in boldface font): 1 Enter the number of terms you want to find: Enter the number of terms you want to find: The last line of your program should be a call to main(). Don t forget to includedocstrings! How many terms are needed to obtain an approximation to the golden ratio accurate to 4 decimal places? A Statistics Program You ve probably used a calculator to find the average of a list of numbers and perhaps you ve also calculated the standard deviation. Averages, known as means in statistics talk, and standard deviations are used all the time and in all walks of life, basically whenever groups of numbers are of interest. 4
5 The average on your first exam was 80.1 and the standard deviation was This means that about 68% of you scored between 64.2 and 96.0, i.e., within 1 standard deviation of the mean (you did better than last fall s class!). In Lab #7 you defined a function calledget floats(). For part 2 of this assignment you ll add four other functions, and your program will then be capable of prompting a user for numbers, summing their values, and finding their average and standard deviation. Program Requirements For part 2, you need to write a program calledstats.py with five functions. get floats(): Copy this function from Lab #7. It take a single integer argument and returns a list of floats. summer(): This non-void function takes a single list argument, and returns the sum of the list. However, it does not use the sum() function to do so. See Summing Values the Hard Way below for instructions on how to implement this function. average(): This non-void function uses the list of numbers returned by get floats() as its argument and returns the average value, a float, to the calling program. It calls summer() to sum the values in the list. Its body can actually be a single line: areturn statement followed by the appropriate expression. See the notes below on Calculating Averages. std dev(): This non-void function takes two arguments, the list of numbers obtained by get floats() and the average obtained using average(), and returns the standard deviation, a float value. The function should initialize an accumulator to zero and then use a for-loop in which the average is subtracted from the list value and the result is squared and added to the accumulator. After thefor-loop has finished looping, the accumulator should be divided by the number of elements in the list, the square root taken, and the result returned to the calling function. See the notes below on Calculating Standard Deviations. main(): Finally, write the void function main(). It should prompt a user for the number of elements desired in the list and should call the non-void functions get floats(), average(), andstd dev(). Then it should print the average and standard deviation to the screen. Use theround() function to round off the standard deviation to two decimal places. Summing Values the Hard Way 1 summer() takes a single list argument. First you need to initialize an accumulator to zero, then use a for-loop to add the value of each element in the list, and finally return the total sum to the calling program. The proper behavior ofsummer() is demonstrated below. 1 The easy way is to use the built-in functionsum(). 5
6 1 >>> x = [9, 3, 21, 15] 2 >>> summer(x) >>> summer([31.12, , 24.9, 82.0, 14.0]) Calculating Averages Recall that the average of a list of numbers is simply the sum of the values divided by the number of values. Mathematically, for a set of numbersx 1, x 2,, x N, the average is given by x = 1 N (x 1 +x 2 + +x N ) where N is the number of terms in the list. The average, or mean, is often indicated by an overbar i.e., x indicates the average of a set of numbersx k. The average is also given by x = 1 N N x k k=1 where the uppercase Greek letter Sigma (Σ) means perform a sum. The expression to the right of Sigma is what is to be summed. The expression below Sigma initializes a summation index (in this casek) and the term above Sigma indicates the final value of the summation index. Calculating Standard Deviations The standard deviation is a measure of how much fluctuation or deviation there is in a set of numbers after the average has been subtracted from each of the values 2. If all the values in a list are equal to the average, then the standard deviation is zero. If the standard deviation is large, then it means many values deviate considerably from the average. The standard deviation is represented by the lowercase Greek letter sigma (σ). For a set of numbersx 1, x 2,, x N, the standard deviation is given by σ = 1 N [(x 1 x) 2 +(x 2 x) 2 + +(x N x) 2 ] where x is the average. Recall that in Python we can square a value z using z ** 2 and we can calculate the square root usingz ** 0.5. The following three examples demonstrate the results you should obtain for three different sets of input for your stats.py program. Each of these has the same mean but an increasing standard deviation. In the first, all the values are the same and hence the standard deviation is zero. 1 Enter the number of list elements: 5 2 Enter float 1: 50 2 For further discussion of standard deviation, see< 6
7 3 Enter float 2: 50 4 Enter float 3: 50 5 Enter float 4: 50 6 Enter float 5: 50 7 Average = Standard deviation = 0.0 Here the values are spread out, spanning the range 30 to 70: 1 Enter the number of list elements: 5 2 Enter float 1: 30 3 Enter float 2: 40 4 Enter float 3: 50 5 Enter float 4: 60 6 Enter float 5: 70 7 Average = Standard deviation = In the final example the values range between 10 and 90: 1 Enter the number of list elements: 5 2 Enter float 1: 10 3 Enter float 2: 30 4 Enter float 3: 50 5 Enter float 4: 70 6 Enter float 5: 90 7 Average = Standard deviation = Don t forget to includedocstrings in all your functions! Submission information. Use Blackboard to submit both your programs. Submit a zipped file called <first initial+lastname> pa5.zip. If you don t know how to zip a file, be sure to ask your TA before your PA is due! Also, be sure it s not empty by checking to see how large it is before submitting it! 7
15 Wyner Statistics Fall 2013
15 Wyner Statistics Fall 2013 CHAPTER THREE: CENTRAL TENDENCY AND VARIATION Summary, Terms, and Objectives The two most important aspects of a numerical data set are its central tendencies and its variation.
More informationMAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015
MAT 142 College Mathematics Statistics Module ST Terri Miller revised July 14, 2015 2 Statistics Data Organization and Visualization Basic Terms. A population is the set of all objects under study, a sample
More information1. The Normal Distribution, continued
Math 1125-Introductory Statistics Lecture 16 10/9/06 1. The Normal Distribution, continued Recall that the standard normal distribution is symmetric about z = 0, so the area to the right of zero is 0.5000.
More informationASSIGNMENT 2. COMP-202A, Fall 2011, All Sections. Due: Monday, October 17th, 2011 (23:30)
ASSIGNMENT 2 COMP-202A, Fall 2011, All Sections Due: Monday, October 17th, 2011 (23:30) Please read the entire pdf before starting. The bottom has important instructions for how to test your code before
More informationMeasures of Dispersion
Lesson 7.6 Objectives Find the variance of a set of data. Calculate standard deviation for a set of data. Read data from a normal curve. Estimate the area under a curve. Variance Measures of Dispersion
More informationCSE100 Principles of Programming with C++
1 Instructions You may work in pairs (that is, as a group of two) with a partner on this lab project if you wish or you may work alone. If you work with a partner, only submit one lab project with both
More informationCpSc 1111 Lab 6 Conditional Statements, Loops, the Math Library, and Random Numbers What s the Point?
CpSc 1111 Lab 6 Conditional Statements, Loops, the Math Library, and Random Numbers What s the Point? Overview For this lab, you will use: one or more of the conditional statements explained below scanf()
More informationCSI33 Data Structures
Outline Department of Mathematics and Computer Science Bronx Community College September 6, 2017 Outline Outline 1 Chapter 2: Data Abstraction Outline Chapter 2: Data Abstraction 1 Chapter 2: Data Abstraction
More informationTOPIC 2 DECIMALS (and INTRODUCTION TO FRACTIONS) WEEK 3
TOPIC DECIMALS (and INTRODUCTION TO FRACTIONS) WEEK 3 Association between Fractions and Decimals is a fraction. It means divided by. If we divide by the result is not a whole number. It is a half of whole
More informationStatistics Case Study 2000 M. J. Clancy and M. C. Linn
Statistics Case Study 2000 M. J. Clancy and M. C. Linn Problem Write and test functions to compute the following statistics for a nonempty list of numeric values: The mean, or average value, is computed
More informationSeptember 11, Unit 2 Day 1 Notes Measures of Central Tendency.notebook
Measures of Central Tendency: Mean, Median, Mode and Midrange A Measure of Central Tendency is a value that represents a typical or central entry of a data set. Four most commonly used measures of central
More informationCS150 - Assignment 5 Data For Everyone Due: Wednesday Oct. 16, at the beginning of class
CS10 - Assignment Data For Everyone Due: Wednesday Oct. 16, at the beginning of class http://dilbert.com/fast/2008-0-08/ For this assignment we re going to implement some initial data analysis functions
More informationPython lab session 1
Python lab session 1 Dr Ben Dudson, Department of Physics, University of York 28th January 2011 Python labs Before we can start using Python, first make sure: ˆ You can log into a computer using your username
More informationCONDITION CONTROLLED LOOPS. Introduction to Programming - Python
CONDITION CONTROLLED LOOPS Introduction to Programming - Python Generating Random Numbers Generating a random integer Sometimes you need your program to generate information that isn t available when you
More informationCS1800 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 informationCpSc 1011 Lab 3 Integer Variables, Mathematical Operations, & Redirection
CpSc 1011 Lab 3 Integer Variables, Mathematical Operations, & Redirection Overview By the end of the lab, you will be able to: declare variables perform basic arithmetic operations on integer variables
More informationThe word zero has had a long and interesting history so far. The word comes
Worth 1000 Words Real Numbers and Their Properties Learning Goals In this lesson, you will: Classify numbers in the real number system. Understand the properties of real numbers. Key Terms real number
More informationCS1800 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 informationMidterm solutions. n f 3 (n) = 3
Introduction to Computer Science 1, SE361 DGIST April 20, 2016 Professors Min-Soo Kim and Taesup Moon Midterm solutions Midterm solutions The midterm is a 1.5 hour exam (4:30pm 6:00pm). This is a closed
More informationCS 211 Programming Practicum Fall 2018
Due: Wednesday, 11/7/18 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a C++ program that will evaluate an infix expression. The algorithm REQUIRED for this program will
More informationHomework 3: Recursion Due: 11:59 PM, Sep 25, 2018
CS17 Integrated Introduction to Computer Science Klein Homework 3: Recursion Due: 11:59 PM, Sep 25, 2018 Contents 1 Factorial 3 2 Fibonacci 4 3 Odds Only 5 4 Increment All 6 5 Frequency 6 6 Sublist 7 6.1
More informationCMSC 201 Spring 2017 Project 1 Number Classifier
CMSC 201 Spring 2017 Project 1 Number Classifier Assignment: Project 1 Number Classifier Due Date: Design Document: Saturday, March 11th, 2017 by 8:59:59 PM Project: Friday, March 17th, 2017 by 8:59:59
More information15-110: Principles of Computing, Spring 2018
15-110: Principles of Computing, Spring 2018 Programming Assignment 11 (PA11) Due: Tuesday, May 1 by 9PM IMPORTANT ANNOUNCEMENT You cant drop this assignment even if it is your lowest PA score. Failure
More informationGeneral Instructions. You can use QtSpim simulator to work on these assignments.
General Instructions You can use QtSpim simulator to work on these assignments. Only one member of each group has to submit the assignment. Please Make sure that there is no duplicate submission from your
More informationChapter 3: Describing, Exploring & Comparing Data
Chapter 3: Describing, Exploring & Comparing Data Section Title Notes Pages 1 Overview 1 2 Measures of Center 2 5 3 Measures of Variation 6 12 4 Measures of Relative Standing & Boxplots 13 16 3.1 Overview
More informationCS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points
CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points Files to submit: 1. HW3.py This is a PAIR PROGRAMMING Assignment: Work with your partner! For pair
More informationT H E I N T E R A C T I V E S H E L L
3 T H E I N T E R A C T I V E S H E L L The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. Ada Lovelace, October 1842 Before
More informationCpSc 111 Lab 3 Integer Variables, Mathematical Operations, & Redirection
CpSc 111 Lab 3 Integer Variables, Mathematical Operations, & Redirection Overview By the end of the lab, you will be able to: declare variables perform basic arithmetic operations on integer variables
More informationQuestion 2. [2 points] True False By default, structures are passed-by-reference.
CS 101, Spring 2016 May 5th Exam 4 Name: For Questions 1 5, circle True or False. Question 1. [2 points] True False A structure is a user-defined data type. Question 2. [2 points] True False By default,
More informationIn this section I m going to explain how to construct a formula, and give you some guidelines to ensure that your formulas work correctly.
Formulas In this section I m going to explain how to construct a formula, and give you some guidelines to ensure that your formulas work correctly. Creating a formula Rule number one: a formula always
More informationSTA Rev. F Learning Objectives. Learning Objectives (Cont.) Module 3 Descriptive Measures
STA 2023 Module 3 Descriptive Measures Learning Objectives Upon completing this module, you should be able to: 1. Explain the purpose of a measure of center. 2. Obtain and interpret the mean, median, and
More informationEXCEL PRACTICE 5: SIMPLE FORMULAS
EXCEL PRACTICE 5: SIMPLE FORMULAS SKILLS REVIEWED: Simple formulas Printing with and without formulas Footers Widening a column Putting labels and data in Bold. PART 1 - DIRECTIONS 1. Open a new spreadsheet
More informationFinal Graded Project. Advanced PC Applications
Final Graded Project Advanced PC Applications INTRODUCTION 1 SCENARIO 1 YOUR TASK 2 PART 1: CREATING YOUR ACCESS DATABASE 2 PART 2: CREATING YOUR EXCEL WORKSHEETS 3 PART 3: CREATING YOUR POWERPOINT PRESENTATION
More information15-110: Principles of Computing, Spring 2018
15-110: Principles of Computing, Spring 2018 Programming Assignment 3 Due: Tuesday, February 6 by 9PM Note: You are responsible for protecting your solutions to the following problems from being seen by
More informationSCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015
SCHEME 7 COMPUTER SCIENCE 61A October 29, 2015 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,
More informationCS 211 Programming Practicum Spring 2017
Due: Tuesday, 3/28/17 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a JAVA program that will evaluate an infix expression. The algorithm REQUIRED for this program will
More informationSCRATCH MODULE 3: NUMBER CONVERSIONS
SCRATCH MODULE 3: NUMBER CONVERSIONS INTRODUCTION The purpose of this module is to experiment with user interactions, error checking input, and number conversion algorithms in Scratch. We will be exploring
More informationCS3L Summer 2011 Exam 2 Time: up to 170 minutes (you may leave when finished; or, you must stop promptly at noon)
CS3L Summer 2011 Exam 2 Time: up to 170 minutes (you may leave when finished; or, you must stop promptly at noon) Name: Login: cs3- First names of the people to your left and right, if any: Left: Right:
More informationExercise: Graphing and Least Squares Fitting in Quattro Pro
Chapter 5 Exercise: Graphing and Least Squares Fitting in Quattro Pro 5.1 Purpose The purpose of this experiment is to become familiar with using Quattro Pro to produce graphs and analyze graphical data.
More informationCpSc 1111 Lab 9 2-D Arrays
CpSc 1111 Lab 9 2-D Arrays Overview This week, you will gain some experience with 2-dimensional arrays, using loops to do the following: initialize a 2-D array with data from an input file print out the
More informationCom S 127 Lab 2. For the first two parts of the lab, start up Wing 101 and use the Python shell window to try everything out.
Com S 127 Lab 2 Checkpoint 0 Please open the CS 127 Blackboard page and click on Groups in the menu at left. Sign up for the group corresponding to the lab section you are attending. Also, if you haven't
More informationCSE 332 Spring 2014: Midterm Exam (closed book, closed notes, no calculators)
Name: Email address: Quiz Section: CSE 332 Spring 2014: Midterm Exam (closed book, closed notes, no calculators) Instructions: Read the directions for each question carefully before answering. We will
More informationBasics: How to Calculate Standard Deviation in Excel
Basics: How to Calculate Standard Deviation in Excel In this guide, we are going to look at the basics of calculating the standard deviation of a data set. The calculations will be done step by step, without
More informationElizabethtown Area School District 7th Grade Math Name of Course
7th Grade Math Name of Course Course Number: N/A Grade Level: 7 Length of Course: full year Total Clock Hours: 150 hours Length of Period: 49 minutes Date Written: 2005-2006 Periods per Week/Cycle: 5/week
More informationProject 3: RPN Calculator
ECE267 @ UIC, Spring 2012, Wenjing Rao Project 3: RPN Calculator What to do: Ask the user to input a string of expression in RPN form (+ - * / ), use a stack to evaluate the result and display the result
More informationName Feb. 14, Closed Book/Closed Notes No electronic devices of any kind! 3. Do not look at anyone else s exam or let anyone else look at yours!
Name Feb. 14, 2018 CPTS 111 EXAM #1 Closed Book/Closed Notes No electronic devices of any kind! Directions: 1. Breathe in deeply, exhale slowly, and relax. 2. No hats or sunglasses may be worn during the
More informationCPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM
CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM Name: Student ID: Signature: Section (circle one): George Steve Your signature acknowledges your understanding of and agreement
More information3.1 Fractions to Decimals
. Fractions to Decimals Focus Use patterns to convert between decimals and fractions. Numbers can be written in both fraction and decimal form. For example, can be written as and.0. A fraction illustrates
More informationCS 1803 Pair Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 29th, before 6 PM Out of 100 points
CS 1803 Pair Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 29th, before 6 PM Out of 100 points Files to submit: 1. HW4.py This is a PAIR PROGRAMMING Assignment: Work with your partner!
More informationCIS 194: Homework 6. Due Monday, February 25. Fibonacci numbers
CIS 194: Homework 6 Due Monday, February 25 Files you should submit: Fibonacci.hs This week we learned about Haskell s lazy evaluation. This homework assignment will focus on one particular consequence
More informationWritten test, 25 problems / 90 minutes
Sponsored by: UGA Math Department and UGA Math Club Written test, 5 problems / 90 minutes October 1, 017 Instructions 1. At the top of the left of side 1 of your scan-tron answer sheet, fill in your last
More informationMidterm Exam 2B Answer key
Midterm Exam 2B Answer key 15110 Principles of Computing Fall 2015 April 6, 2015 Name: Andrew ID: Lab section: Instructions Answer each question neatly in the space provided. There are 6 questions totaling
More informationBasic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces
Basic memory model Using functions Writing functions Basics Prototypes Parameters Return types Functions and memory Names and namespaces When a program runs it requires main memory (RAM) space for Program
More informationSpring 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 informationMATH 2650/ Intro to Scientific Computation - Fall Lab 1: Starting with MATLAB. Script Files
MATH 2650/3670 - Intro to Scientific Computation - Fall 2017 Lab 1: Starting with MATLAB. Script Files Content - Overview of Course Objectives - Use of MATLAB windows; the Command Window - Arithmetic operations
More informationGrade 6 Math Proficiency Scale Quarter 1
Number Systems Geometry Grade 6 Math Proficiency Scale Quarter 1 1 = Novice 2 = Partially Proficient partial proficient the partially proficient(2) standard partial proficient start the Computes quotients
More informationLab Exam 1 D [1 mark] Give an example of a sample input which would make the function
CMPT 127 Spring 2019 Grade: / 20 First name: Last name: Student Number: Lab Exam 1 D400 1. [1 mark] Give an example of a sample input which would make the function scanf( "%f", &f ) return -1? Answer:
More informationCpSc 1011 Lab 5 Conditional Statements, Loops, ASCII code, and Redirecting Input Characters and Hurricanes
CpSc 1011 Lab 5 Conditional Statements, Loops, ASCII code, and Redirecting Input Characters and Hurricanes Overview For this lab, you will use: one or more of the conditional statements explained below
More informationCPSC 217 Assignment 3
CPSC 217 Assignment 3 Due: Monday November 23, 2015 at 12:00 noon Weight: 7% Sample Solution Length: 135 lines, including some comments (not including the provided code) Individual Work: All assignments
More informationFundamentals of Programming Session 8
Fundamentals of Programming Session 8 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 These slides have been created using Deitel s slides Sharif University of Technology Outlines
More informationCS 2316 Pair 1: Homework 3 Enigma Fun Due: Wednesday, February 1st, before 11:55 PM Out of 100 points
CS 2316 Pair 1: Homework 3 Enigma Fun Due: Wednesday, February 1st, before 11:55 PM Out of 100 points Files to submit: HW3.py This is a PAIR PROGRAMMING assignment: Work with your partner! For pair programming
More informationSTANDARDS OF LEARNING CONTENT REVIEW NOTES. ALGEBRA I Part II. 3 rd Nine Weeks,
STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I Part II 3 rd Nine Weeks, 2016-2017 1 OVERVIEW Algebra I Content Review Notes are designed by the High School Mathematics Steering Committee as a resource
More informationThe American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011
The American University in Cairo Department of Computer Science & Engineering CSCI 106-07&09 Dr. KHALIL Exam-I Fall 2011 Last Name :... ID:... First Name:... Form I Section No.: EXAMINATION INSTRUCTIONS
More informationLinear course which is assessed by 3 exam papers at the end of Year 11. Further details about the exams will be available in due course.
Key Stage 4 (Sets P* - E) *Set P may follow this scheme of learning or may follow the scheme of learning for sets M P. Subject: Mathematics Aims of the subject: We aim to develop the full potential of
More information15-110: Principles of Computing, Spring 2018
15-110: Principles of Computing, Spring 2018 Programming Assignment 2 Due: Tuesday, January 30 by 9PM on Autolab Note: You are responsible for protecting your solutions to the following problems from being
More informationCondition Controlled Loops. Introduction to Programming - Python
+ Condition Controlled Loops Introduction to Programming - Python + Repetition Structures n Programmers commonly find that they need to write code that performs the same task over and over again + Example:
More informationEE 109 Lab 8a Conversion Experience
EE 109 Lab 8a Conversion Experience 1 Introduction In this lab you will write a small program to convert a string of digits representing a number in some other base (between 2 and 10) to decimal. The user
More informationChapter 3 Analyzing Normal Quantitative Data
Chapter 3 Analyzing Normal Quantitative Data Introduction: In chapters 1 and 2, we focused on analyzing categorical data and exploring relationships between categorical data sets. We will now be doing
More informationHonors Computer Science Python Mr. Clausen Program 7A, 7B
Honors Computer Science Python Mr. Clausen Program 7A, 7B PROGRAM 7A Turtle Graphics Animation (100 points) Here is the overview of the program. Use functions to draw a minimum of two background scenes.
More informationSpring CS Homework 3 p. 1. CS Homework 3
Spring 2018 - CS 111 - Homework 3 p. 1 Deadline 11:59 pm on Friday, February 9, 2018 Purpose CS 111 - Homework 3 To try out another testing function, check-within, to get more practice using the design
More informationDOING MORE WITH EXCEL: MICROSOFT OFFICE 2013
DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data
More informationUser Manual. Version 3.1. Copyright 2000 Academia Software Solutions All Rights Reserved
The GR System User Manual Version 3.1 Copyright 2000 Academia Software Solutions All Rights Reserved All contents of this manual are copyrighted by Academia Software Solutions. The information contained
More informationCPSC 217 Assignment 3
CPSC 217 Assignment 3 Due: Monday November 26, 2018 at 12:00 noon Weight: 7% Sample Solution Length: Approximately 120 lines, including blank lines, lots of comments and the provided code Individual Work:
More informationCS 211 Programming Practicum Spring 2018
Due: Thursday, 4/5/18 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a C++ program that will evaluate an infix expression. The algorithm REQUIRED for this program will
More informationProperties and Definitions
Section 0.1 Contents: Operations Defined Multiplication as an Abbreviation Visualizing Multiplication Commutative Properties Parentheses Associative Properties Identities Zero Product Answers to Exercises
More informationCMSC 201 Fall 2016 Homework 6 Functions
CMSC 201 Fall 2016 Homework 6 Functions Assignment: Homework 6 Functions Due Date: Wednesday, October 26th, 2016 by 8:59:59 PM Value: 40 points Collaboration: For Homework 6, collaboration is not allowed
More informationCOMP 111 PROGRAMMING I MODULARITY USING FUNCTIONS
COMP 111 PROGRAMMING I MODULARITY USING FUNCTIONS Instructor: Dr Dionysiou ADMINISTRATIVE This week s lecture [BRON06] Chapter 6 (6.1) What is a function? Function declaration (prototype) Function definition
More information2.Simplification & Approximation
2.Simplification & Approximation As we all know that simplification is most widely asked topic in almost every banking exam. So let us try to understand what is actually meant by word Simplification. Simplification
More informationMath 214 Introductory Statistics Summer Class Notes Sections 3.2, : 1-21 odd 3.3: 7-13, Measures of Central Tendency
Math 14 Introductory Statistics Summer 008 6-9-08 Class Notes Sections 3, 33 3: 1-1 odd 33: 7-13, 35-39 Measures of Central Tendency odd Notation: Let N be the size of the population, n the size of the
More informationSTANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I. 4 th Nine Weeks,
STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I 4 th Nine Weeks, 2016-2017 1 OVERVIEW Algebra I Content Review Notes are designed by the High School Mathematics Steering Committee as a resource for
More informationBramhall High school Year 8 Assessment Descriptors Mathematics
Grade Description Calculate with negative indices in the context of standard form. 8/9 Multiply (divide) numbers written in standard form. Use inequalities to describe the range of values for a rounded
More informationADD AND NAME WORKSHEETS
1 INTERMEDIATE EXCEL While its primary function is to be a number cruncher, Excel is a versatile program that is used in a variety of ways. Because it easily organizes, manages, and displays information,
More informationCS 1803 Pair Homework 10 Newsvendor Inventory Policy Due: Monday, November 29th before 6:00 PM Out of 100 points
CS 1803 Pair Homework 10 Newsvendor Inventory Policy Due: Monday, November 29th before 6:00 PM Out of 100 points Files to submit: 1. HW10.py This is a PAIR PROGRAMMING Assignment: Work with your partner!
More informationUsing Basic Formulas 4
Using Basic Formulas 4 LESSON SKILL MATRIX Skills Exam Objective Objective Number Understanding and Displaying Formulas Display formulas. 1.4.8 Using Cell References in Formulas Insert references. 4.1.1
More informationDecimals. Chapter Five
Chapter Five Decimals 5.1 Introductions to Decimals 5.2 Adding & Subtracting Decimals 5.3 Multiplying Decimals & Circumference of a Circle 5.4 Dividing Decimals 5.5 Fractions, Decimals, & Order of Operations
More information6th Grade P-AP Math Algebra
6th Grade P-AP Math Algebra If your student is considering a jump from 6th grade P-AP to 7th Grade Advanced math, please be advised of the following gaps in instruction. None of the 7th or 8th grade mathematics
More informationSpring 2018 Discussion 7: March 21, Introduction. 2 Primitives
CS 61A Scheme Spring 2018 Discussion 7: March 21, 2018 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme
More informationHow To Think Like A Computer Scientist, chapter 3; chapter 6, sections
6.189 Day 3 Today there are no written exercises. Turn in your code tomorrow, stapled together, with your name and the file name in comments at the top as detailed in the Day 1 exercises. Readings How
More informationCS 320 Midterm Exam. Fall 2018
Name: BU ID: CS 320 Midterm Exam Fall 2018 Write here the number of the problem you are skipping: You must complete 5 of the 6 problems on this exam for full credit. Each problem is of equal weight. Please
More informationHaskell Types COMP360
Haskell Types COMP360 No computer has ever been designed that is ever aware of what it's doing; but most of the time, we aren't either. Marvin Minsky Haskell Programming Assignment A Haskell programming
More informationSCHEME OF WORK YR 8 THETA 2 UNIT / LESSON
SCHEME OF WORK YR 8 THETA 2 UNIT / LESSON STEPS STEPS FROM TO 1 Number 4th 6th OBJECTIVES 1.1 Calculations 5th 5th Use written methods to add and subtract with decimals. Calculate mentally. Calculate with
More informationFall 2017 Discussion 7: October 25, 2017 Solutions. 1 Introduction. 2 Primitives
CS 6A Scheme Fall 207 Discussion 7: October 25, 207 Solutions Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write
More informationQuestion 2. [5 points] Given the following symbolic constant definition
CS 101, Spring 2012 Mar 20th Exam 2 Name: Question 1. [5 points] Determine which of the following function calls are valid for a function with the prototype: void drawrect(int width, int height); Assume
More informationRev Name Date. . Round-off error is the answer to the question How wrong is the rounded answer?
Name Date TI-84+ GC 7 Avoiding Round-off Error in Multiple Calculations Objectives: Recall the meaning of exact and approximate Observe round-off error and learn to avoid it Perform calculations using
More informationThe American University in Cairo. Academic Computing Services. Excel prepared by. Maha Amer
The American University in Cairo Excel 2000 prepared by Maha Amer Spring 2001 Table of Contents: Opening the Excel Program Creating, Opening and Saving Excel Worksheets Sheet Structure Formatting Text
More informationSCHEME The Scheme Interpreter. 2 Primitives COMPUTER SCIENCE 61A. October 29th, 2012
SCHEME COMPUTER SCIENCE 6A October 29th, 202 In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs, we will eventually
More informationBASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I
BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment
More informationWarm-up sheet: Programming in C
Warm-up sheet: Programming in C Programming for Embedded Systems Uppsala University January 20, 2015 Introduction Here are some basic exercises in the programming language C. Hopefully you already have
More informationTrigonometry and the Unit Circle. Chapter 4
Trigonometry and the Unit Circle Chapter 4 Topics Demonstrate an understanding of angles in standard position, expressed in degrees and radians. Develop and apply the equation of the unit circle. Solve
More informationDevelopmental 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