Anne Dawson: CSCI120A_HW3_SP05.htm   

 

Last updated: Tuesday 8th February 2005, 13:18 PT

 

This document is subject to change without notice.

 

Please report any errors or omissions in this document:

adawson@coquitlamcollege.com

 

Special instructions:

For this assignment you must work alone.

For due date, see course schedule. 

 

CSCI120A

 

Introduction to Computer Science and Programming

Spring 2005

Homework 3

Calculation of Mean and Standard Deviation

 

Step 1

 

Using the Internet, search for the formula to calculate mean and standard deviation of a set of numeric values.

 

Note: you do not type in the code of your program until Step 4.

 

Your program asks the user for the number of values to be entered, then requests the numbers, and outputs the mean and standard deviation of the numbers. You must use at least one function in your program to perform the calculations.

 

Step 2

 

Design and document your algorithm. http://www.coquitlamcollege.com/adawson/Pseudocode.htm

 

Step 3

 

Write the pseudocode from your algorithm.

http://www.coquitlamcollege.com/adawson/Pseudocode.htm

 

Step 4

 

Using your pseudocode as a guide, implement your program in the Python language. Use the IDLE GUI to edit and run your program:

http://www.coquitlamcollege.com/adawson/Python_Editor_IDLE.htm

 

Your program should start with a comment block that contains the following information:

 

#  File:       hw3.py

#  Purpose:    Mean and Standard Deviation Calculations

#  Programmer: [your name]   

#  Course:     CSCI120A

#  Date:      

#  Test data:

 

 

Step 5

 

Test your program by running supplying your own test data. You should test your program with at least 3 sets of test data. Show your test data and results in comments at the top of your program.

 

Step 6

 

At the start of class on the due date, save your program file (hw3.py) and your alogorithm and pseudocode file to your folder on the network in:

 

CSCI120A\Week07\HW3

 

 

Program points will be based on the following marking scheme:

 

Marking Scheme: CSCI120A   -   HW3  -   Mean and Standard Deviation Calculations

Student name:

Category

Points

Description

Algorithm

15

An informal description of the steps that must be taken to solve the problem.

ref: http://www.coquitlamcollege.com/adawson/Pseudocode.htm

Pseudocode

15

A formal description of the steps that must be taken to solve the problem.

http://www.coquitlamcollege.com/adawson/Pseudocode.htm

Comments

10

The program is commented appropriately.

Style

15

The source code should use meaningful variable names (identifiers).

Output

15

Screen prompts and results should be user-friendly.

Correctness

10

The program should output correct results.

Completeness

10

The program should be complete.

Test

10

Comments in the code explain how the code was tested.

 

 

Assignment Presentations :  A random selection of homework programs may be presented to the CSCI120A group in class.