Only thing I have really is:
myFile = open("input.txt", "r") numVals = int(myFile.readline())
I've tried doing variations of :
with open("file.txt", "r") as inFile: for line in inFile:
sum=0 for i in range(numVals): num= (int(myFile.readline()) sum=
I've tried separating the names and grades, by specifying the line then adding to it (ex. Names are odd, +2 so it'll always have name), but nothing. I've also tried messing with splits, and that seems to be what I need to be using, so I'm going to continue messing around with that.
The other thing that has me confused is, that is probably much simpler than I'm making it out to be, is the formula. If I have a formula to use the grades for the text, how do I make it plug it in into the correct places? I tried assigning each variable and then finding which segments of the lines are for which variable, but that sees to defeat the purpose of using the text file.
Again, I'm really not looking for an answer to this. I'm just looking for advice to point me in a direction or something to read up on. I'm just tired of being frustrated. Haha