5  Data Types

5.1 Task : Return changed size strings

5.1.1 Package “istec-p4”

  • Use the package you created in the previous session.
  • Use the package locally (you don’t need to publish it to everyone)
  • Within this package, create a module named data-types with the following within:
    • A function named myupper.
      • This function will receive as an input a string and return the same string in uppercase.
    • A function named mylower.
      • This function will receive as an input a string and return the same string in lowercase.
    • A function named invertSizing
      • This function will receive as an input a string and if the string is in uppercase, it will return the same string as lowercase. If the string is in lowercase it will return the same string in uppercase.

5.2 Task : Return string parts

5.2.1 Package “istec-p4”

  • Use the package you created in the previous session.
  • Use the package locally (you don’t need to publish it to everyone)
  • Within this package, create a module named data-types with the following within:
    • A function named string-part
      • This function will receive 2 parameters as an input: a string st and a number n.
      • The function return the first n characters of the string st.