6.8

Assignment 8

home work!

Programming Language BSL

Due Date Mon 2/6 at 11:59pm

Possible Points 51

Purpose To design functions that recur on lists and use lists in a big-bang program.

Graded Exercises

Every new piece of data requires the four steps of the design recipe for new data.

Every new function requires the four steps of the design recipe for functions.

Exercise 1 Design a function that given a list of strings and a number n outputs the same list but only with strings less than length n.

Exercise 2 Design a function that given a list of strings and a number n outputs whether or not all strings in that list are greater than length n.

Exercise 3 Design a function that given a list of numbers and a number n outputs the same list but with n added to every element.

Exercise 4 Design a function that given a list of numbers and a number n outputs a list where n is divided by every element in the list. If this would produce an error, the element in the list should be the string "DIV0". Note: this exercise requires at least one new data definition not covered by the previous ones.

Exercise 5 Design a simple slide show program that given a list of strings will display them one at a time and advance when someone clicks. The program ends when there are no more words to display and then shows a blank screen. Note: the program is given a list of strings. That means the call to big-bang should be wrapped inside a function that takes a list of strings.