Cmpt 120 - Assn 3

June 24, 2017 | Autor: Alisha Sharma | Categoria: Programming Languages
Share Embed


Descrição do Produto

Simon Fraser University School of Computing Science

Cmpt 120 – Assignment 3 – Part 1

Objective Our objective, in this Assignment 3 – Part 1, is to practise creating functions.

Assignment 3 - Part 1 is to be done on our own (not in pairs).

Part 1 1. Let’s download the “One Possible Solution to Assignment 2: EquationCalculator.py” found below the description of this assignment. Name it EquationCalculator_w_Functions.py. 2. Let’s make sure it executes (let’s fix it, if it does not) and let’s make sure it works as expected with all the valid and invalid data described in our Assignment 2 (again, let’s fix it if it does not). 3. Let’s create some functions: encapsulate code fragments of this program into functions. The function interface is up to us. In other words, how many functions are needed is up to us. The name of each function is up to us. Whether each function requires parameters (or not) and if so, how many is up to us. Whether each function returns a value (or not) and if so, which one, is up to us. Note: When creating functions, we are not expected to change a lot of the current code.

Submission 

Submit our file: EquationCalculator_w_Functions.py on CourSys by Friday October 23, 2015 15:30.



We can submit our work to CourSys as many times as we wish, but it is the last submission that counts. So, let's make sure that our last submission is done before the deadline.



No late submission will be accepted: any submission made after the due date and time stated above will not be marked for grades. However, they will be marked to provide feedback to students. o The only exception is for medical reasons. If we are not able to submit our assignment on time due to a medical reason, we must notify the instructor by email right away and provide her with a doctor’s note as soon as possible.

Marking We shall be marking Assignment 3 - Part 1 and/or Assignment 3 - Part 2 (which will be soon posted). While marking, we will look at how well our solution(s) satisfy the Requirements listed below: 

Names of variables: are they descriptive?



Functions: is each of our functions performing one main (well-defined) action, i.e., it has one purpose? does the name of each of our functions describe the main action or purpose performed by this function?



We do not use break, continue, pass or sys.exit( ) in our Python program.



Header comment block: does it contain the name of the file, a description of the program, the name of the author and the creation date of the program?



User interaction: is it providing clear and unambiguous instructions to the user such as the format of the data to be entered? is it labeling the output clearly?



Code: is the code easy to read? is it well indented? is it commented?



Whether or not the program is a Python program and not a screenshot of the Python Interpreter Shell window?



Whether or not the program executes: are there any syntax and/or runtime errors?



Whether or not the program solves the problem: are there any semantic errors?



Finally, are the requirements described in the section called Part 1 of this assignment satisfied?

Have fun!

Anne Lavergne – Oct. 2015

Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.