Can someone please help me with this Lisp question? Write a function in Lisp, Nove Scotia License plate that when handed a list will check if the first three are single letters and last three are numbers. If this is so, return 'T'. If there are any other mixtures, like numbers where there should be letters, if the first three are not single letters only, if the numbers are greater than 9, if the numbers are in the wrong place, if you get more or less than 6 things in the license number, or if the first character is greater than 'G (that's about where they are now), then you should return a NIL. No need to consider vanity or motorcycle plates. * (NSLicense '(S M R T I E)) NIL * (NSLicense '(W O T 1 2 3)) NIL * (NSLicense '(WHAT IS THIS 1 12 123)) NIL * (NSLicense '(A A A 0 0 0)) T
Can someone please help me with this Lisp question?
Write a function in Lisp, Nove Scotia License plate that when handed a list will check if the first three are single letters and last three are numbers. If this is so, return 'T'. If there are any other mixtures, like numbers where there should be letters, if the first three are not single letters only, if the numbers are greater than 9, if the numbers are in the wrong place, if you get more or less than 6 things in the license number, or if the first character is greater than 'G (that's about where they are now), then you should return a NIL. No need to consider vanity or motorcycle plates.
* (NSLicense '(S M R T I E))
NIL
* (NSLicense '(W O T 1 2 3))
NIL
* (NSLicense '(WHAT IS THIS 1 12 123))
NIL
* (NSLicense '(A A A 0 0 0))
T
Step by step
Solved in 2 steps