Write some code that inputs a number (already done for you), and checks whether it's between 1 and 10. If it is, then thank the user via a suitable message, otherwise alert them that their number has been rejected.
Write some code that inputs a string (already done for you), and checks whether it's between 5 and 15 characters. If it is, then thank the user via a suitable message, otherwise alert them that their input has been rejected.
Write some code that inputs a string (already done for you), and checks whether it is the name of a farmyard animal, notably: a cow, horse, pig or goose. You should raise an error if it isn't, and you check shouldn't be case sensitive, e.g. "cow" or "Cow" or "COW" would all be accepted.
An alphanumeric character is either a letter (whether uppercase or lowercase) or a digit (0-9). Write a function that checks whether the input consists only of alphanumeric characters. Your function should return either true or false.
Bank sort codes help identify the bank and branch of the bank account, e.g. "Halifax bank in Kingston-upon-Thames". These are of the form XX-XX-XX where each X is a digit, for example 49-30-03. All bank accounts for IngallBank start with 40. Write a function that determines whether the input is a valid IngallBank sort code.