The Student Room Group

A453 Evaluation

Scroll to see replies

Original post by Jrp051
averaging is easier same as sorting the problem I've got as mentioned before is formatting it correctly to save multiple values to the same student please someone relate.


If the text file was something like this -

John = 2
Tom = 3
Tanzil = 4
Karan = 4
John = 3
John = 8

You would research how to look for certain data within a .txt file, so if you wanted to find John in the text file you make a variable called 'name' and then do something like this:

for line in data:
if name in data:

.....

Then once you found the name your looking for, you can simply print them out.

If name = John

John = 2
John = 3
John = 8

wlll be outputted then you research how to split the lines and only find the integers which you can then sum up and divide to output an average..

Hope this helped!
Reply 21
Original post by KryptoModz
If the text file was something like this -

John = 2
Tom = 3
Tanzil = 4
Karan = 4
John = 3
John = 8

You would research how to look for certain data within a .txt file, so if you wanted to find John in the text file you make a variable called 'name' and then do something like this:

for line in data:
if name in data:

.....

Then once you found the name your looking for, you can simply print them out.

If name = John

John = 2
John = 3
John = 8

wlll be outputted then you research how to split the lines and only find the integers which you can then sum up and divide to output an average..

Hope this helped!


but how will you know what names you are looking for
Original post by Jrp051
but how will you know what names you are looking for


Name will be an input as soon as the program starts.
Reply 23
Original post by KryptoModz
Name will be an input as soon as the program starts.


I have made task 3 as a stand alone program for 2 and 3 the program just asks which class and how you want it to be sorted then looks through the right class file depending on the input. The class files are from task 2 and look like this :
James 9
Bob 7
Jim 3
etc etc
if you enter the same name twice it still works .
When it comes to creating averages with 3 scores shouldn't it be like this:
Bob 7 8 5
Jim 3 5 9
James 1 9 10

but then when you sort it just looks at the first number and sorts it.... I think
Original post by Jrp051
I have made task 3 as a stand alone program for 2 and 3 the program just asks which class and how you want it to be sorted then looks through the right class file depending on the input. The class files are from task 2 and look like this :
James 9
Bob 7
Jim 3
etc etc
if you enter the same name twice it still works .
When it comes to creating averages with 3 scores shouldn't it be like this:
Bob 7 8 5
Jim 3 5 9
James 1 9 10

but then when you sort it just looks at the first number and sorts it.... I think


I couldn't get my program to print it like this:

Tom = 2

Another try...

Tom = 2, 4

I could only get it like this

Tom = 2
Tom = 4

So i programmed task 3 to ask which class the user is in then ask the name, it find all the lines on the text file with the persons name and outputs it like the following:

Tom = 8
Tom = 6
Tom = 7

Then splits each line outputted to make it like this (it won't be shown but inside the system it would be like this )

Tom
8
Tom
6
Tom
7

Then i extract all of the integers and output the average.

If you see what i mean?
Reply 25
Original post by KryptoModz
I couldn't get my program to print it like this:

Tom = 2

Another try...

Tom = 2, 4

I could only get it like this

Tom = 2
Tom = 4

So i programmed task 3 to ask which class the user is in then ask the name, it find all the lines on the text file with the persons name and outputs it like the following:

Tom = 8
Tom = 6
Tom = 7

Then splits each line outputted to make it like this (it won't be shown but inside the system it would be like this )

Tom
8
Tom
6
Tom
7

Then i extract all of the integers and output the average.

If you see what i mean?


so YOU decide who is in the class and then save the members of the class in a text file?
Original post by Jrp051
so YOU decide who is in the class and then save the members of the class in a text file?


No?

The class does the test and the pupils results are saved within the text file. If a student decides to repeat the quiz it wont add there score to the line which there first result is already saved. It will save it to a new line.

What this code does, is asks the teacher which students results + average they would like to view.

It then searches each line of the text file and each line that includes (name) then teacher inputted it will output the line.

Then the program will use that line and split it from strings and integers. Then using the integers a average will be calculated which will then be printed.

I've explained it enough times :biggrin:
Reply 27
Original post by KryptoModz
No?

The class does the test and the pupils results are saved within the text file. If a student decides to repeat the quiz it wont add there score to the line which there first result is already saved. It will save it to a new line.

What this code does, is asks the teacher which students results + average they would like to view.

It then searches each line of the text file and each line that includes (name) then teacher inputted it will output the line.

Then the program will use that line and split it from strings and integers. Then using the integers a average will be calculated which will then be printed.

I've explained it enough times :biggrin:

really sorry to be a pain do you have any python code to back this up if not I'll try figure something out myself
Original post by Jrp051
really sorry to be a pain do you have any python code to back this up if not I'll try figure something out myself


I do but I don't really want to give it out, as its apart of my code and don't want any plagiarising. Sorry :frown:
help me
I am so confused O.o the OCR computer science needs 5k+ words to get a decent grade? someone explain this I'm really intrigued now since i do Edexcel CS
Original post by jamestg
Does it meet the requirements of the task?
Has it been coded efficiently?
Is your flowchart and pseudocode any good, what did it do for you?
Do you use appropriate techniques?
Have you found any errors?
How have you fixed those errors?
Have you tested your app comprehensively so it works?

Try and write 2/3 paragraphs for each task evaluation. Then do one whole page of overall evaluation of your work. Your document should be around 5,000 words long.


Do you mean that the whole of A453 is a document???
Original post by Warrenlogas
Do you mean that the whole of A453 is a document???


Idk this was two years ago lol.

Quick Reply

Latest

Trending

Trending