Tags: %TAGME{ tpaction="" web="Main" tag="" }% view all tags

List Comprehension Homework

Moodle Link

This homework is a bit different. You are to use list comprehension to solve a series of problems, then write code to test them. The starting repl.it is here:

https://repl.it/@JimSkon/ListComprehensionHW

Write code to complete each function. Then at the bottom write code to fully test each solution. Your goal is to test several different cases, including all the "special cases". Special cases are "boundary conditions". For example, in the first case in addition to ckecking regular cases (a normal list of numbers and strings), we check a list with only one element, and one with no elements.

If there are different type of cases, for example cases which include certain things we are looking for, or don't include such things, include those. A part of this homework is to show you can write tests that fully test your code.

Topic revision: r1 - 2020-04-22 - JimSkon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback