The Student Room Group

AQA AS Computing Skeleton Code 2014

Scroll to see replies

Original post by jack2014
hi lads

my teacher isnt really helping us much.
i was wondering if someone can post how to do the bubble sort on visual basic using the skeleton program?
cheers


If you check the first or second page Khaaaaan gave his solution for a bubblesort on the RecentScores,
i checked it out and it seems to work fine
My website might help AQA computing students a lot, it contains a lot of revision notes plus potential Q&A that might come up- codes written in all languages from java to visual basic.
http://revise4exam.weebly.com
http://revise4exam.weebly.com/comp1-2014-potential-qa.html
(edited 9 years ago)
How is revision going??
Reply 83
Hi guys, does anyone have the Java skeleton code programs for the previous exams?
I've found 2009 and 2013, but I'm struggling to find the rest of them.
I'm looking for them to help revise for section c, so thanks if anyone has them
Reply 85
help with the sub getcards please

what does

For count = 1 to (52 - noofcardsturnedover)
deck(count) = Deck(count + 1)
next
deck(52 - noofcardsturnedover).suit = 0

mean?
Reply 86
I found these really useful for comp 1 last year http://goo.gl/2y11kS
Original post by lindsayr
help with the sub getcards please

what does

For count = 1 to (52 - noofcardsturnedover)
deck(count) = Deck(count + 1)
next
deck(52 - noofcardsturnedover).suit = 0

mean?


This routine gets the next card in the array. It performs this task by removing the first card from the array (card[1]) and storing it in ThisCard, then moving all the rest of the cards up the array so the new card[1] is card[2], new card[2] is card[3] and so on, all through the pack. The last card becomes zero, zero (ie. no suit, no rank).
Reply 88
Hey guys, we should create some MODEL answers for section C for COMP1! Like gather all the questions from previous papers and apply them to our program, since its the section most students struggle on :smile:
I'm kinda curious how you would get for instance 7/10 marks or 5/8 marks on a question. Since it seems almost all solutions are just a right or wrong sorta answer. Like either your code works out the solution correctly or it doesn't and should be fairly obvious to you when it does or does not.

In that regard if your solution works correctly regardless of many other factors should that warrant full marks on a question? Or are things like efficiency taken into consideration? I know some things such as adding in sorts of validation and stuff here and there to make the code work 100% is needed too. Yet again that all seems fairly obvious.

My main point here being it seems like on questions you either get 0 or near full marks if your solution works.

What instances would you lose marks if your solution worked?
Reply 90
Well the reason I could see to lose marks is for efficiency, pascal casing, and making sure your code is in the right place, other than this, I don't really see any other places to lose marks
Reply 91
Original post by macgregorm
This routine gets the next card in the array. It performs this task by removing the first card from the array (card[1]) and storing it in ThisCard, then moving all the rest of the cards up the array so the new card[1] is card[2], new card[2] is card[3] and so on, all through the pack. The last card becomes zero, zero (ie. no suit, no rank).



Thanks, that was really helpful!
Do you know why in the last sub routines, Playgame, at the end it has

If gameover then
displayendofgamemessage(noofcardsturnedover - 2)
updaterecentscores(recentscores, noofcardsturnedover - 2)
else
displauendofgamemessage(51)
updaterecentscores(recentscores, 51)
end if

why is there -2 and 51 in brakets, what does that do?
(edited 9 years ago)
Reply 92
Original post by KaizaUrai
There is a likelihood that they will ask us to edit the card game so that ace is high.

def IsNextCardHigher(LastCard, NextCard): #2 Variables
Higher = False
if NextCard.Rank > LastCard.Rank:
Higher = True
## if NextCard.Rank >= LastCard.Rank and LastCard.Rank == 1:
## Higher = False
## elif NextCard.Rank < LastCard.Rank and LastCard.Rank == 1:
## Higher = True
#### This piece of code is used to change the code to "Aces High" mode.
return Higher

This does it, but has no indenting due to the formatting of the editor here


that doesn't work, if you run it and enter 'n' every time it accepts everything.. regardless of whats higher or lower.
guys,

check this out: http://gmshaw.dyndns.org/comp1/

website all about the prerelease :smile:

also a resources pack.... http://doocument.com/pdf/aqa-comp1-summer-2014-rawlins-academy-vle-276413.pdf
(second one takes a little time to load)
(edited 9 years ago)
Original post by lindsayr


why is there -2 and 51 in brakets, what does that do?


This is my take:

The -2 refers to -1 because the first card in the game is turned over and another -1 because the game ended and the last card turned over was not guessed so this shouldn't count towards the score.
The 51 means that if you turn over 51 cards you won the game because as this is the maximum value of cards turned over because again the first card was turned over but does not count as a score.

Hope that helped...
Reply 95
ok i need help :frown:
i want to be able to save the recent scores in a text file, i've almost done it, however i can only save the most recent score.. not all 3 and i have no idea what im doing wrong :/ can anyone help me?

def save():
for Count in range(1, NO_OF_RECENT_SCORES + 1):
b= str(RecentScores[1].Score)
c= str(RecentScores[1].Name)
a=open('Recent.txt', 'w')
line =a.writelines(c + ' got a score off ' + b)
return Choice

Thats the code I added (simply added a 5th option for this user defined function on the menu ), but it will only ever display the first score..
this is all the code with my modifications...
https://drive.google.com/file/d/0B43plQVMZbhWYkFCSkFCTi04cjQ/edit?usp=sharing
if anyone can help that would be great.. Thanks!
Reply 96
Can someone write a list of topics that come on the comp1 exam please. thanks.
Reply 97
Principles of computation
Stages of problem solving
Finite state machines
Algorithm design
Programming stuff
Programming structure
Error checking
Data representation
System development life cycle


If I've missed anything someone pls correct me:awesome:
Reply 98
Original post by khaaaaan
Principles of computation
Stages of problem solving
Finite state machines
Algorithm design
Programming stuff
Programming structure
Error checking
Data representation
System development life cycle


If I've missed anything someone pls correct me:awesome:


Thankssssssssss
Reply 99
Why are you using append?
Isn't it output if you want to save?
And input if you want to load?

Quick Reply