TM112: Introduction to Computing and Information Technology 2
Tutor-Marked Assignment (Spring 2024/25)
Cut-Off Date: TBA
Total Marks: 30
Contents
Question1 ...……………………….……………………………………………………………………..…..1
Question 2 …..……………………………………………………………………………………….…..…..2
Question 3 …..……………………………………………………………………………………….…..…..3
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own TMA work and avoid
plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must provide all
references in case you use and quote another person's work in your TMA. You will be penalized for any act of
plagiarism as per the AOU's rules and regulations.
Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA
work):
I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized
any other person's work. I have provided all references of information that I have used and quoted in
my TMA work.
Name of Student:………………………………..
Signature:…………………………………………...
Date:……………………………………………………
1
Question 1: [10 marks]
You are asked to do some research, and answer the following questions using your own
words.
a. What does the term “ Smart” mean when we refer to technologies and what is the
purpose behind using it? Discuss.
b. Talk about three types that Smart devices can use to communicate/compute and give
an example on each.
c. What is the difference between Smart connected devices and Smart devices?
Discuss.
d. There are many advantages of using Smart technologies, among which are
convenience and security. Discuss, giving an example on each.
e. You should include valid references (at least two).
Question 2: File Handling for Animal Classification [10 Marks]
Problem Statement
You are required to develop a Python program that performs structured file handling and
data processing for animal classification. The program should:
Part 1: Writing Data to a File
1. Create a text file (YourName.txt) and store records of animals.
2. Each record should follow this format:
3. Animal Name, Animal Type, Halal Status
Example:
Cow,Mammal,Halal
Dog,Mammal,Not Halal
Chicken,Bird,Halal
4. You must include at least 9 records, ensuring three (3) records each for:
o Mammals
o Birds
o Reptiles
5. The file must include your name somewhere within its content.
Part 2: Reading & Processing Data
2
Your program should then:
1. Read the data from the created file.
2. Process each line by extracting:
o Animal Name
o Animal Type (e.g., Mammal, Bird, Reptile)
o Halal Status (Halal / Not Halal)
3. Classify the animals based on their type.
4. Count and display:
o The total number of halal animals.
o The total number of non-halal animals.
5. Ensure proper formatting of the output.
Implementation Constraints
- Use only one loop for reading and processing the file.
- Lists are not allowed.
- The output format must exactly match the expected format.
- Screenshots of:
Your code
The output displayed in the terminal
The text file content
should be included in your submission.
Question 3 : Visualizing Data with Turtle Graphics [10 Marks]
In the previous task, you created a file handling program that classified animals based on
their type and Halal status. Now, you will extend your work by visualizing the results
using Turtle Graphics in Python.
Task Requirements
1. Read the file (YourName.txt) created in the previous assignment.
2. Extract and count:
o Total number of Halal animals
o Total number of Non-Halal animals
3. Use Turtle Graphics to create a pie chart:
3
o Green section → Represents Halal animals.
o Red section → Represents Non-Halal animals.
o Ensure the proportions are accurate.
4. Add labels using Turtle Graphics:
o Display the category names ("Halal", "Not Halal") beside each section.
o Include the exact count of each category.
5. Ensure proper formatting for clear visualization.
Implementation Constraints
- The program must read from the text file (YourName.txt).
- The pie chart should be drawn dynamically based on file content.
- No hardcoded values—the program should work for any number of records.
- The Turtle drawing should be properly labeled and formatted for readability.
Submission Requirements
1. Submit your .py file containing the implemented solution.
2. Include screenshots of:
o Your Turtle Graphics output.
o Your code editor (showing both the code and part of your desktop).
o The text file (YourName.txt) content used as input.
3. Ensure proper code documentation (e.g., meaningful variable names, comments
explaining each section).
4. The shape it will be like below