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
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
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).
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
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?
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
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?
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.
ok i need help 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!
Principles of computation Stages of problem solving Finite state machines Algorithm design Programming stuff Programming structure Error checking Data representation System development life cycle
Principles of computation Stages of problem solving Finite state machines Algorithm design Programming stuff Programming structure Error checking Data representation System development life cycle