ITEC136 Homework 6   Solved

30.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (3 votes)


  1. [10 points] Develop a program that reads students’ grades from a file named “studentdata.txt’, and writes their names and average into a new file named “studentaverage.txt’. Round the numbers to the closest integer.
    The following sample file called studentdata.txt contains one line for each student in an imaginary class. The student’s name is the first thing on each line, followed by some exam scores. The number of scores might be different for each student.

studentdata.txt sample file content

Joe 10 65 80 90 100
Bill 83 76 69 72
Sue 98 72 77 84 52 97 94 91 99
Grace 82 21 75 90 98


studentaverage.txt sample file content

Joe 69
Bill 75
Sue 85
Grace 73


  1. [10 points] Please develop a program to help you crack the following secret message. For the encryption we have used simple Caesar cipher. You can find more information on Write a function to decrypt the message.  The function must have offset value, input file and output file parameters.  The offset value is the number n as described in the wiki.  No global variables are used in the function.  Function parameters must be used.


mysterysample.txt file content:

Yvccf kyviv! Kyv bvpj kf kyv yfljv riv yzuuve leuvi kyv wcfnvi gfk.


messagesample.txt file content:

Hello there! The keys to the house are hidden under the flower pot.

After you develop your program, read the mystery.txt and output the original message into message.txt

Hint: Use % operator where needed. Only decrypt the alphabets. Leave non-alphabet as is.

mystery.txt file content:

Uzjtzgczev zj kyv sizuxv svknvve xfrcj reu rttfdgczjydvek.

Dfkzmrkzfe zj nyrk xvkj pfl jkrikvu. Yrszk zj nyrk bvvgj pfl xfzex.

Pfl ufe’k nrek kf cffb srtb reu befn pfl tflcu yrmv ufev svkkvi.