Lecture 6
[Pages:38]Lecture 6
Specifications & Testing
Announcements For This Lecture
Last Call
Assignment 1
? Acad. Integrity Quiz ? Take it by tomorrow ? Also remember survey
? Posted on web page
? Due Wed, Sep. 22nd ? Today's lab will help ? Revise until correct
? Can work in pairs
? We will pair if needed ? Submit request TONIGHT ? One submission per pair
9/14/21
Specifications & Testing
2
One-on-One Sessions
? Started Monday: 1/2-hour one-on-one sessions
? To help prepare you for the assignment ? Primarily for students with little experience
? There are still some spots available
? Sign up for a slot in CMS
? Will keep running after September 22nd
? Will open additional slots after the due date ? Will help students revise Assignment 1
9/14/21
Specifications & Testing
3
Recall: The Python API
Function name
Possible arguments
Module
9/14/21
What the function evaluates to
? This is a specification
? Enough info to call function ? But not how to implement
? Write them as docstrings
Specifications & Testing
4
Anatomy of a Specification
def greet(n):
One line description, followed by blank line
"""Prints a greeting to the name n
Greeting has format 'Hello !' Followed by conversation starter.
Parameter n: person to greet Precondition: n is a string""" print('Hello '+n+'!') print('How are you?')
9/14/21
Specifications & Testing
5
Anatomy of a Specification
def greet(n):
One line description, followed by blank line
"""Prints a greeting to the name n
Greeting has format 'Hello !' Followed by conversation starter.
More detail about the function. It may be many paragraphs.
Parameter n: person to greet Precondition: n is a string""" print('Hello '+n+'!') print('How are you?')
9/14/21
Specifications & Testing
6
Anatomy of a Specification
def greet(n):
One line description, followed by blank line
"""Prints a greeting to the name n
Greeting has format 'Hello !' Followed by conversation starter.
More detail about the function. It may be many paragraphs.
Parameter n: person to greet Precondition: n is a string""" print('Hello '+n+'!') print('How are you?')
Parameter description
9/14/21
Specifications & Testing
7
Anatomy of a Specification
def greet(n):
One line description, followed by blank line
"""Prints a greeting to the name n
Greeting has format 'Hello !' Followed by conversation starter.
More detail about the function. It may be many paragraphs.
Parameter n: person to greet Precondition: n is a string""" print('Hello '+n+'!') print('How are you?')
Parameter description
Precondition specifies assumptions we make about the arguments
9/14/21
Specifications & Testing
8
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- basic python programming for loops and reading
- regular expressions text editing and
- introduction to network programming with python
- python programming
- part 1 introduction to python
- introduction to python brown university
- comp 150 exam 1 overview loyola university
- introduction to python programming course notes
Related searches
- marketing management pdf lecture notes
- strategic management lecture notes pdf
- strategic management lecture notes
- philosophy 101 lecture notes
- philosophy lecture notes
- philosophy of education lecture notes
- financial management lecture notes
- financial management lecture notes pdf
- business management lecture notes
- introduction to philosophy lecture notes
- business management lecture notes pdf
- introduction to management lecture notes