Undec
Badges: 16
Rep:
?
#1
Report Thread starter 4 years ago
#1
Just finished all of my coursework for computing GCSE.
I think I have gotten full marks in one and 2 marks off full marks in the second one.
I can give any tips or pointers.
0
reply
qwertyfat
Badges: 7
Rep:
?
#2
Report 4 years ago
#2
Well Done! I found them really challenging. Did you have the computer booking system app inventor task?
0
reply
dRaGoN2509
Badges: 8
Rep:
?
#3
Report 4 years ago
#3
(Original post by Undec)
Just finished all of my coursework for computing GCSE.I think I have gotten full marks in one and 2 marks off full marks in the second one.I can give any tips or pointers.


hello gj, i'm stuck on the A453 programming task; I have no idea how to code for task 2 and 3, I think I've done task 1 correctly. Any help would be appreciated.
0
reply
qwertyfat
Badges: 7
Rep:
?
#4
Report 4 years ago
#4
(Original post by dRaGoN2509)
hello gj, i'm stuck on the A453 programming task; I have no idea how to code for task 2 and 3, I think I've done task 1 correctly. Any help would be appreciated.
You need to learn how to read and write to text files
0
reply
Paul Atreides
Badges: 7
Rep:
?
#5
Report 4 years ago
#5
(Original post by Undec)
Just finished all of my coursework for computing GCSE.
I think I have gotten full marks in one and 2 marks off full marks in the second one.
I can give any tips or pointers.
Any tips for full marks on A452?
0
reply
dRaGoN2509
Badges: 8
Rep:
?
#6
Report 4 years ago
#6
(Original post by qwertyfat)
You need to learn how to read and write to text files
yes I know that but I tried to create a code in Python for it but it doesn't work correctly. Can someone give me some advice on how to do this?
0
reply
thebaco123
Badges: 2
Rep:
?
#7
Report 4 years ago
#7
(Original post by dRaGoN2509)
yes I know that but I tried to create a code in Python for it but it doesn't work correctly. Can someone give me some advice on how to do this?
For task 2 you need to write the name and score to a textfile on a new line.
Here is a basic idea of how you'd go about doing that.
Code:
textfile = open(filename,"a+") #Opens textfile as append
textfile.write("text\n") #Writes text and new line
textfile.close() #Closes textfile
In the write bit, you could write it to the textfile like "name|score"


However for task 3 I really can't really go into too much detail about that...
But I'd go about it by going through each line of the text file, splitting it by the "|" and appending that to a list of some sort.
Then when it comes to sorting the list I can't go into too much detail but I'd use the SORTED function. I'd recommend you follow some documents/wiki guides for it such as this: https://wiki.python.org/moin/HowTo/S...dule_Functions
0
reply
Undec
Badges: 16
Rep:
?
#8
Report Thread starter 4 years ago
#8
(Original post by Paul Atreides)
Any tips for full marks on A452?
I completed all of the 3 tasks. But I spent extra time taking each piece of code and annotating it and saying what it does and how it works. Also in the improvement/evaluation part I wrote in a lot of detail how I did the task what I had problems in (described why they occurred) and how i resolved them. I also did a lot of testing of the programs.
0
reply
NoodleGCSEFOOD
Badges: 10
Rep:
?
#9
Report 4 years ago
#9
Need help on A453 too, I dont know if this is the same coursework as you but I have to program a speed camera type device in python. Can anyone help me with task 2 and 3? Thanksx
0
reply
thebaco123
Badges: 2
Rep:
?
#10
Report 4 years ago
#10
(Original post by NoodleGCSEFOOD)
Need help on A453 too, I dont know if this is the same coursework as you but I have to program a speed camera type device in python. Can anyone help me with task 2 and 3? Thanksx
Looks like task 2 is about saving a list of vehicles with non-standard registrations which are exceeding the speed limit to a file.

So, from task 1 it looks like you should have already coded the basics of checking the speed of each vehicle.
It looks like you should be using a list to store the registrations and time taken to travel for each vehicle, like so:
Code:
data = (["registration1", 10], ["registation2", 7], ["registation3", 8])
Now, it looks like while you are going through that list, you must check if the registration plate is standard, and write it to a file if it isn't.
For this, I would certainly use "regex" to check if the registration string matches the standard. It looks like I can't really give out too much for that without cheating, so I'd recommend you read up on it here: https://docs.python.org/3/howto/regex.html or have a look elsewhere.

Here's an example of how to check a postcode is non-standard in the UK e.g. LS18 4AA:
Code:
if not re.match("^[A-Z][A-Z]\d\d \d[A-Z][A-Z]$", postcode):
    print("Postcode is non-standard")
Obviously, you'll have to adjust that for the format of a vehicle registration for yourself.

Then, once you've determined it's non-standard, you will to save the data to a file.
As an example, you can write it to a text file like this:
Code:
file = open("textfile.txt","a") #Opens in append mode
file.write(string +"\n") #Write to file and create new line
file.close() #Close file

For task 3, it looks like it's about matching up the registration with name and details from another file.
While you are checking each vehicle for the list, you would have to add a FOR loop for each entry of the file to check if it equals the registration of the vehicle exceeding the speed limit.
It also looks like you'd then have to use that data to save to another file with information about the registration, speed, name and address.
0
reply
NoodleGCSEFOOD
Badges: 10
Rep:
?
#11
Report 4 years ago
#11
(Original post by thebaco123)
Looks like task 2 is about saving a list of vehicles with non-standard registrations which are exceeding the speed limit to a file.

So, from task 1 it looks like you should have already coded the basics of checking the speed of each vehicle.
It looks like you should be using a list to store the registrations and time taken to travel for each vehicle, like so:
Code:
data = (["registration1", 10], ["registation2", 7], ["registation3", 8])
Now, it looks like while you are going through that list, you must check if the registration plate is standard, and write it to a file if it isn't.
For this, I would certainly use "regex" to check if the registration string matches the standard. It looks like I can't really give out too much for that without cheating, so I'd recommend you read up on it here: https://docs.python.org/3/howto/regex.html or have a look elsewhere.

Here's an example of how to check a postcode is non-standard in the UK e.g. LS18 4AA:
Code:
if not re.match("^[A-Z][A-Z]\d\d \d[A-Z][A-Z]$", postcode):
    print("Postcode is non-standard";)
Obviously, you'll have to adjust that for the format of a vehicle registration for yourself.

Then, once you've determined it's non-standard, you will to save the data to a file.
As an example, you can write it to a text file like this:
Code:
file = open("textfile.txt","a";) #Opens in append mode
file.write(string +"\n";) #Write to file and create new line
file.close() #Close file
Thanks for this even though I barely understand the code principle, have you got skype where we can have a conversation about this? Or at least share my code and to start implementing task 2 and 3. I got an A on the last coursework and dont want to get a bad mark on this
0
reply
thebaco123
Badges: 2
Rep:
?
#12
Report 4 years ago
#12
(Original post by NoodleGCSEFOOD)
Thanks for this even though I barely understand the code principle, have you got skype where we can have a conversation about this? Or at least share my code and to start implementing task 2 and 3. I got an A on the last coursework and dont want to get a bad mark on this
Sent you a PM.
0
reply
Cheshirecatt
Badges: 0
Rep:
?
#13
Report 4 years ago
#13
can i get some help for a453? task 2 and task 3 i have got so far and am having trouble putting the reg plates that are wrong and speed into a file and havn't even started task 3 so any help would be appreciated please pm me
0
reply
dRaGoN2509
Badges: 8
Rep:
?
#14
Report 4 years ago
#14
(Original post by Cheshirecatt)
can i get some help for a453? task 2 and task 3 i have got so far and am having trouble putting the reg plates that are wrong and speed into a file and havn't even started task 3 so any help would be appreciated please pm me
same^ please pm me as well as I really need help with A453. Thanks.
0
reply
lilsadkitty
Badges: 2
Rep:
?
#15
Report 4 years ago
#15
anyone done the arithmetic quiz for a453??


Posted from TSR Mobile
0
reply
ZS1
Badges: 13
Rep:
?
#16
Report 4 years ago
#16
have you done the Caesar cipher? need serious help with that. and making an algorithm is really tough
0
reply
thebaco123
Badges: 2
Rep:
?
#17
Report 4 years ago
#17
(Original post by dRaGoN2509)
same^ please pm me as well as I really need help with A453. Thanks.
Done.

(Original post by lilsadkitty)
anyone done the arithmetic quiz for a453??


Posted from TSR Mobile
What do you need help with?

(Original post by ZS1)
have you done the Caesar cipher? need serious help with that. and making an algorithm is really tough
Please elaborate what the task is asking you to do. Do you want to encode it in Caesar cipher? Decode it?
0
reply
ZS1
Badges: 13
Rep:
?
#18
Report 4 years ago
#18
(Original post by thebaco123)
What do you need help with?



Please elaborate what the task is asking you to do. Do you want to encode it in Caesar cipher? Decode it?
The task wants me to encrypt the message in caesar cypher and wants me to decrypt it too.
0
reply
thebaco123
Badges: 2
Rep:
?
#19
Report 4 years ago
#19
(Original post by illuminatio)
hey bro if its possible could you send me the code for task two and three because i have finished task one, but i am really stuck on task two and three and i only have one week left to finish.
Doesn't look like he will send you his full code, but if you tell us the task and what you're struggling with we can try to help you out.
0
reply
Undec
Badges: 16
Rep:
?
#20
Report Thread starter 4 years ago
#20
(Original post by lilsadkitty)
anyone done the arithmetic quiz for a453??


Posted from TSR Mobile
What are you stuck on with this one? I can explain it to you how you could go around doing it
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Are you travelling in the Uni student travel window (3-9 Dec) to go home for Christmas?

Yes (96)
28.24%
No - I have already returned home (44)
12.94%
No - I plan on travelling outside these dates (65)
19.12%
No - I'm staying at my term time address over Christmas (34)
10%
No - I live at home during term anyway (101)
29.71%

Watched Threads

View All