0% found this document useful (0 votes)
41 views

PracTest1 Thursday

The document provides instructions for a practical test involving: 1. Creating a directory structure in Linux using commands. 2. Writing and modifying a Python program to print a list with loop counters and string manipulations. 3. Creating a history file of used commands and copying a README file to include test details. 4. Zipping the work directory for submission and assessment by the tutor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

PracTest1 Thursday

The document provides instructions for a practical test involving: 1. Creating a directory structure in Linux using commands. 2. Writing and modifying a Python program to print a list with loop counters and string manipulations. 3. Creating a history file of used commands and copying a README file to include test details. 4. Zipping the work directory for submission and assessment by the tutor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

COMP1005/5005 - Practical Test 1

1. Setting up for Practical Test 1

Within your work area, create the following structure using Linux commands (1 mark)

PracTest1
|
The Life
| |
Meaning Holy Of
| | |
Of Grail Brian
|
Life

We will be working in the PracTest1/The/Meaning/Of/Life directory for the test.

2. Type in and modify a Python program


Expected Output
Type in and run this program test1.py:
Prac Test 1 Words:
# 0 THE
# Student Name: <your name> 1 giam
# Student ID : <your ID> 2 OF
3 fi
# 4 42
test1.py: Create a string and print it
#
lifelist == ["The", "Meaning", "of", "Liff", "42"]
print("\nPrac Test 1 Words:\n")
print[lifelist)

Modify the code in test1.py to:


1. Correct any errors
2. In a loop, print the loop counter, then the matching element in the list (1 mark)
3. If the counter is even (0,2,4…), print the counter & the string in uppercase (1 mark)
4. If the loop counter is odd, print the counter, and then every second character in the
string backwards, in lowercase (1 mark)

3. README and history

 Record the history of the commands you’ve used with : history > hist.txt
 Copy the README file from your Prac01 (or Prac02) directory to your PracTest1
directory. Update the README file to refer to files and directories you have created, use
today’s date and to include the test1.py program and a short description of it.

4. Submission and Assessment

Ask your tutor to assess your work when complete.


All of your work for this test should be submitted via Blackboard using the link on the
Assessment page. This should be done as a single "zipped" file. To make the zip file, go to
your FOP directory and type:

zip –r PracTest1_ID PracTest1

End of Test

You might also like