FIN312: Design and implement a function common_letters(words_list) that returns a list of letters that appear in all the words: Mathematics and Programming for FinTech Assignment, SUSS, Singapore

Updated: 6 Feb 2023 Free Assignment Question
Table of Contents

    Need a Custom-Written Answer for This Question?

    Our Singapore-based academic experts write 100% original, Turnitin + Originality.ai checked answers — delivered within your deadline.

    Request Plagiarism-Free Answer

    🔒 100% confidential · No data stored

    Get a 100% Human-Written Answer (AI-Free) Free quote in 10 minutes · 100% confidential
      University Singapore University of Social Science (SUSS)
      Subject FIN312: Mathematics and Programming for FinTech

      Question 1

      a) Design and implement a function common_letters(words_list) that returns a list of letters that appear in all the words of words_list.

      Requirements:

      • Uppercase and lowercase letters are considered the same.
      • The result must be in uppercase, sorted alphabetically, and have no duplicates.

      For example:

      FIN312 Mathematics and Programming for FinTech

      Explanation: The letters that appeared in all three words are ‘A’, ‘L’, and ‘M’ as
      highlighted: McDonald’s, HappyMeal, LemonTea.

      (b) Given the following 5 test cases, print the results from your function using this code:

      for t in cases:
      print(f”Result: {common_letters(t)}”)

      FIN312 Mathematics and Programming for FinTech

      Hire a Professional Essay & Assignment Writer for completing your Academic Assessments

      Native Singapore Writers Team

      • 100% Plagiarism-Free Essay
      • Highest Satisfaction Rate
      • Free Revision
      • On-Time Delivery

      Question 2

      (a) Let 𝐴 = (𝑎1, 𝑎2, …, 𝑎𝑛) and 𝐵 = (𝑏1, 𝑏2, …, 𝑏𝑛) be two points in the 𝑛-dimensional space ℝ𝑛. We can think of each point as a tuple of 𝑛 real numbers.

      Define the proximity-𝒑 metric between A and B using the formula:

      FIN312 Mathematics and Programming for FinTech

      where the symbol |𝑥| represents the absolute value of 𝑥. The proximity-𝑝 metric is a generalized way to measure ‘distance’ between 𝐴 and 𝐵.

      Example: Suppose 𝐴 = (1,1) and 𝐵 = (5,4) in the 2-dimensional plane.

      • When p = 1, we get the distance to travel along the lines of a square grid. In this case, 𝐷1 (𝐴, 𝐵) = 𝑝𝑟𝑜𝑥𝑖𝑚𝑖𝑡𝑦(1, (1,1), (5,4)) = 7.
      • When p = 2, we get the familiar ‘Euclidean distance’ from Pythagoras’ Theorem. In this case, 𝐷2 (𝐴, 𝐵) = 𝑝𝑟𝑜𝑥𝑖𝑚𝑖𝑡𝑦(2, (1,1), (5,4)) = 5.

      FIN312 Mathematics and Programming for FinTech

      Task: Implement the function 𝑝𝑟𝑜𝑥𝑖𝑚𝑖𝑡𝑦(𝑝, 𝐴, 𝐵) that takes in an integer 𝑝, point A and point B (each represented as a tuple of 𝑛 real numbers). The function should compute and return the value of 𝐷𝑝 (𝐴, 𝐵) using the given formula.

      (b) Given the following 5 test cases, print the results from your function using this code:

      for p, A, B in cases:
      print(f”Result: {proximity(p, A, B):.3}”)

      FIN312 Mathematics and Programming for FinTech

      Buy Custom Answer of This Assessment & Raise Your Grades

      Get Help By Expert

      Get the best value for your money with Singaporeassignmenthelp.com! Our cheap assignment help services are designed to provide you with top-quality academic assistance at a fraction of the cost. With a team of experienced and highly qualified assignment help experts, we guarantee to deliver high-quality and plagiarism-free assignments that meet your academic requirements. Whether you need help with essays, dissertations, case studies, or any other type of assignment, we are here to help you achieve academic success. Contact us today and let us help you get the grades you deserve!

      Do you need a fresh written answer for this question?

      100% human-written, Turnitin + Originality.ai checked — delivered before your deadline.

      Request Answer →

      Author Bio

      Laura Tan
      Laura Tan

      I am an academic writer since 2003 and associated with Singapore Assignment Help. I have expertise in making dissertation proposal. Till now i helped more than 2000 Singaporean and Malaysian Students in completing their masters dissertations thesis and other academic papers.

      It's your first order?

      Use discount code SAH15 and get 15% off

      Need this question answered?