Check for Mistakes in this Word Problem: long-name?
Directions: Names that are longer than 20 characters are considered long names. Write a function that takes in a person’s name and returns true if it is a long name and false if it is not.
Contract and Purpose Statement
Every contract has three parts ...
Check if a name is longer than 20 characters
Write some examples, then circle and label what changes ...
long-name?"John Joseph Jingleheimer Schmidt")(> (string=? "John Joseph Jingleheimer Schmidt") 10)
long-name?"Joe Jones")(> (string=? "Joe Jones") 10)
Write the definition, giving variable names to all your input values ...
(define (
long?name)(< name 20))