预定/报价
Python辅导 | FIT1008 Interview Prac 2
阿叶2024-05-15 18:05:22

留学生作业代写do not hesitate to contact me!
WeChat:lovexc60


FIT1008 Introduction to Computer Science (FIT2085: for Engineers) Interview Prac 2 – Weeks 8 and 9
Semester 2, 2019

Learning objectives of this practical session

To be able to implement and use basic container classes in Python.
Important requirements

For this prac, you are required to:
• Create a new file/module for each task named task[num].py (that is, task1.py, task2.py, and so on).
• Provide documentation for each basic piece of functionality in your code (see below)
• The documentation needs to include (in the docstring):
– pre and post conditions
– Big O best and worst time complexity – information on any parameters used

• Provide testing for those functions/methods explicitly specified in the questions. The testing needs to include:
– a function to test it
– a comment indicating the purpose of each test
– at least two test cases per test function. These cases need to show that your
functions/methods can handle both valid and invalid inputs.
– assertions for testing the cases, rather than just printing out messages

Your tests should be added to the corresponding test_task[num].py file provided

• VERY IMPORTANT: The code cannot use any of the Python list or string functionality that would make the job trivial (so no slicing, append, prepend, str, len, eq for lists,
and __contains__ for strings, etc). However, you may:
– Track the capacity of your internal array using len (as we have in the ListADT
skeleton).
– Use str, eq, etc. on members of the list (e.g. when implementing __str__ or __eq__).
– Use string methods (e.g. startswith) for command processing (determining that “read small.txt” is a read command with argument “small.txt”).
– Use any functions/methods you wish in your testing code.

Supporting Files