IT 116: Introduction to Scripting
Class 18 Exercise
Script for this exercise
Open a text editor
You can use the editor built into IDLE or use a program like Sublime.
Copy the text below into the file
Save the file as ex18.py
Copy the data file scores.txt
Using FileZilla, connect to pe15.
Go to the directory /home/ghoffman/course_files/it116_files.
Click and drag the file from pe15 to the
directory that holds your script.
Run this script in IDLE
Open the script file in IDLE. Under the Run menu, select Run Module.
You should see
10
98
77
90
33
17
44
8
19
53
42
26
38
88
87
42
9
73
21
59
There were 20 numbers
The average of the numbers was 47
Copy the file to Unix
Open FileZilla and connect to
pe15.cs.umb.edu
You will have to connect using your Unix username and password.
Go to your 116 directory
Go to your ex directory
Copy the data file scores.txt
Using FileZilla, connect to pe15.
Go to the directory /home/ghoffman/course_files/it116_files.
Click and drag the file from pe15 to the
directory that holds your script.
Running my test script on your script (Optional)
If you want to run my text script on your Class Exercise script do the following
Connect to pe15.cs.umb.edu
Use an ssh client.
Run my test code on your script
~ghoffman/it116_test/ex18.sh
The script will prompt you for your Unix username.