TMA 02
Tutor-marked assignment TMA 02
Assignment submission
This module requires all assignments to be submitted electronically. To submit an
assignment, please follow the link(s) from your StudentHome page to the online TMA/EMA
service.
If you foresee any difficulty with submitting your assignment on time, you should contact your
tutor well in advance of the cut-off date.
Help with assignment questions
You should read the TM112 Assessment guide in the Assessment section of the TM112
website before answering the questions here.
If you need further guidance on any assignment questions, please ask your tutor, who will be
happy to help. Do not discuss TMA questions on the forums.
Your TMA answers must be your own work. The University takes copying answers from
others, collusion with other students and soliciting answers from others very seriously.
Assignments are checked both automatically and by your tutor. Any offences can have
grave consequences, from disallowing part or whole of an assessed piece of work to
withholding or withdrawing qualification, credit or registration.
https://learn2.open.ac.uk/mod/oucontent/view.php?id=2263345&printable=1
07/06/2024, 11:16
Page 1 of 17 Word count
You must provide a word count for each question or question part where a limit is specified.
Evidence of Block 2 quiz engagement for this TMA 02
The final question of this TMA asks you for evidence of engagement with the Block 2 quiz.
Read the final question first to make sure you know what will be required.
Question 1 (23 marks)
You must give a word count for any question with a maximum word limit.
This question is about Block 2 Part 1. In Question 1, Question 3 and Question 6 of this TMA you
will explore the roles of cloud computing, smart devices and location-based services in a smart
parking system.
Before answering these three TMA questions, you will need to read the article that can be found
here: https://www.mokosmart.com/smart-parking-system-using-iot/. Your answers will be based on
the content of the article and the module materials.
Note that if (and only if) this external link becomes inaccessible, a pdf copy will be made available
to download from the Assessment page.
Each of Questions 1, 3 and 6 can be answered independently of each other, but you may find it
useful to read all three questions before you start so as to avoid any duplication in your answers.
a. Define what is meant by the Internet of Things (IoT). Then continue by relating each part of
your definition to the context given in the article, being clear as to what the 'things' are, the
kind of data being processed in the cloud and the technologies being used to connect them
together within a bigger system.
The maximum word limit for part a. is 125 words.
(8 marks)
https://learn2.open.ac.uk/mod/oucontent/view.php?id=2263345&printable=1
07/06/2024, 11:16
Page 2 of 17 b. Do you think that smart parking is 'green'? Give at least one point on either side of the
argument and come to a clear conclusion.
The maximum word limit for part b. is 120 words.
(8 marks)
c. Cloud providers say that the cloud offers elasticity and scalability in terms of its processing
capabilities. Explain what the terms in italics mean and suggest how the owner of a smart
parking scheme might benefit from each.
The maximum word limit for part c. is 70 words.
(4 marks)
d. Write a reference for this article using the Cite Them Right version of Harvard guidance here:
Cite Them Right
It is important that you follow the format carefully as you will be assessed on your accuracy
in following a referencing guide.
(3 marks)
(Total 23 marks)
Question 2 (18 marks)
This question provides an opportunity for you to demonstrate your understanding of the problem-
solving approach taught in TM112 and the patterns introduced in Block 1 Part 4 and Block 2 Part
2. You can find an overview of the problem-solving approach and a list of all the patterns TM112
teaches in the Problem solving and Python quick reference and you will need to refer to this
document as you work on the question.
Important note: you do not need to get a working program in part a. in order to attempt part
b.
A student wants to write a program to check whether a book ISBN number is valid or not. Here is a
top-level decomposition:
https://learn2.open.ac.uk/mod/oucontent/view.php?id=2263345&printable=1
07/06/2024, 11:16
Page 3 of 17 > Check ISBN number
>> Initialise a list to the 13 digits of the ISBN number to be checked
>> Make a new list by leaving the items at the even indexes (0, 2, 4 etc.) unchanged and
multiplying the items at the odd indexes by 3
>> Find the sum of the items in the transformed list
>> If the remainder of the sum divided by 10 is 0, result is valid, else the result is invalid
>> Print the result
So, for example, if an ISBN number is 978-0-141-18321-3 the input is this list:
[9, 7, 8, 0, 1, 4, 1, 1, 8, 3, 2, 1, 3]
and the output will be valid.
One of the tests of your code should be for an input list representing a possible ISBN number
partly based on the example given above and partly derived from your Pl number. So, the first six
digits in your ISBN list should be the first six digits from your PI number and the remaining digits
will be 1, 1, 8, 3, 2, 1, 3. So, for example, for the Pl number B9081720, your ISBN list will be:
[9, 0, 8, 1, 7, 2, 1, 1, 8, 3, 2, 1, 3]
The first part of this question will only consider the following part of the decomposition.
>Check ISBN number
>> Initialise a list to the 13 digits of the ISBN number to be checked
>> Make a new list by leaving the items at the even indexes (including 0) unchanged and
multiplying the items at the odd indexes by 3
You may want to temporarily add a print statement to check the output.
https://learn2.open.ac.uk/mod/oucontent/view.php?id=2263345&printable=1
07/06/2024, 11:16
Page 4 of 17 a.
i. Describe the input data and the output data for this first task.
ii. Specify one further input list you might use in testing in addition to the list you have
created using your PI number. Make sure that you state the test input, the expected
output and a brief explanation of why you selected this test.
iii. Write an algorithm based on Pattern 2.4.
iv. Implement your algorithm as Python code. Your code must match the steps of your
algorithm and you should use comments in the code to make it clear how the two
correspond. Marks will be lost if the program does not follow the algorithm. Copy your
Python code, as text, into your Solution document. Name your Python file
Q2a_OUCU.py, where ‘OUCU' is your OU computer username, e.g. abc123. Then
include the code file in your TMA zip file.
You should aim to use only the Python features that are introduced in the module. If
you decide to use techniques or language features that TM112 does not cover, you
must give a justification for your decisions; otherwise, marks will be lost.
(9 marks)
b. In this part of the question, you will implement the final steps in the top-level decomposition
given at the beginning of this question:
>> Find the sum of the items in the transformed list
>> If the remainder of the sum divided by 10 is 0, result is valid, else result is invalid
>> Print the result
So, for example, for this step, if the input is the list:
[9, 21, 8, 0, 1, 12, 1, 3, 8, 9, 2, 3, 3]
The output valid will be printed.
https://learn2.open.ac.uk/mod/oucontent/view.php?id=2263345&printable=1
07/06/2024, 11:16
Page 5 of 17