4QQMN506: Programming for

Accounting and Finance


Project 2 Questions (15%)


Independent Project1: Information

Deadline:

• Start Date: 19th March 2021 09:00am.

• End date: 1st April 2021 10am.


Content covered:

• Practical Python coding knowledge from lectures and tutorials Weeks 1 – 6.


General Expectations:

• Expectation is to use good practice such as commenting and correct code formatting.

• The program should work and display correct outputs.


Independent Project2: Submission

Submission:

• Assignment submissions are to be submitted on Cengage MindTap learning platform via the online platform.

• Once your solutions are ready. You will only be allowed ONE SUBMIT on MindTap. Please Press Submit. Press Confirm.

• Your MindTap registration must be with your registered university email address, full name and student ID.

• It is strongly encouraged as first priority to submit directly on Cengage MindTap.

• If you have difficulty accessing, registering or a technical issue with Cengage MindTap a secondary online submission link will be provided on KEATS.

• Do not submit on both Cengage MindTap and KEATS

• If you submit on KEATS only please use the cover sheet document provided, complete the cover sheet and on the pages following the cover sheet include a screenshot of your coding for each question.

• Submissions made after the deadline are capped at the pass mark (40) if submitted within 24 hours; submissions made 24 hours or more after the deadline receive a zero mark.

• Students affected by “recognisably disruptive or unexpected events beyond the student’s control that might have a significant and adverse impact on their academic performance” should submit a Mitigating Circumstances Form via Student Records no more than 7 days after the assessment deadline. IT issues are not usually grounds for mitigating circumstances.

• Plan to submit well before the deadline – we recommend at least two hours before.

• NOTE: You will receive an overall point score out of 100 straightaway on MindTap. This will not be the final mark for the project. Marks will be rescaled. The rescaled marks will be available on KEATS within four weeks of the deadline date.


Question1 (Worth 1/3rd of the marks for this project)

• Write a program that inputs a text file.

• The program should print the unique words in the file in alphabetical order.

• Uppercase words should take precedence over lowercase words. For example, 'Z' comes before 'a'.

• The input file can contain one or more sentences, or be a multiline list of words.

• Create and populate your own text file for development.

 An example input file is shown below:


Question2 (Worth 1/3rd of the marks for this project)

• A list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor.

• Define a predicate function isSorted that expects a list as an argument and returns True if the list is sorted, or returns False otherwise.

• (Hint: For a list of length 2 or greater, loop through the list and compare pairs of items, from left to right, and return False if the first item in a pair is greater.)


Question3 (Worth 1/3rd of the marks for this project)

• Write a program that computes and prints the average of the numbers in a text file.

• You should make use of two higher-order functions to simplify the design.

• An example of the program input and output is shown below: