The Student Room Group

Comp 1 2014 Discussion

Things they could ask us:
- Add an additional deck
- Change number of cards in the deck
- Change the number of previous high scores
- Make it so the high scores are saved once you exit the program (Currently doesn't)
- Add more high scores (Currently shows previous 3)
- Reset high scores
- Make it so that if you only have one or two scores, then it doesn't display the other one as '0'
- As mentioned earlier, if the same card pops up as the current then it still says you lose, so they almost DEFINITELY will ask to change this
- add another suit or add another rank
- Make it do more card swaps (Currently 1000)
- Instead it asking yes or no for higher and lower, it could ask to change to directly to whether you think it will be higher or lower
- Can leave Name as blank
- When you shuffle the deck, and then exit the program the shuffled deck isn't saved, it resets to the original
- "Aces high mode" -> Make Ace the highest


All I can think of. The solutions to the above are not too difficult even for a terrible programmer like me. But it is likely they won't ask us some of the above,because they require making many changes across the code, while some require only a few changes. Feel free to add to the list, OR EVEN BETTER, post your solutions.

Scroll to see replies

Reply 1
Use cheat codes to win , Up up down left left right #NotKit
Reply 2
I have created a short youtube video on the tasks that would best prepare you for the Comp1 exam... some will come up i'm sure. other will have improved your agility to respond to task the board set that are unpredictable. I'll be creating further Vids to improve the specification of these tasks and yet more with solutions

Your list is a very good place to start.
(edited 10 years ago)
Reply 3
Original post by Khal1l

- As mentioned earlier, if the same card pops up as the current then it still says you lose, so they almost DEFINITELY will ask to change this
QUOTE]

I have tested this and if you select no it does not say you lose if the same card comes up
Reply 4
I had the comp1 exam today and I got a B i'm pretty sure of it and not a low B but quiet a high B and I was wondering if I get a 100% or close to 100% in comp 2 can I still get an A? :C
Reply 5
Original post by sagar448
I had the comp1 exam today and I got a B i'm pretty sure of it and not a low B but quiet a high B and I was wondering if I get a 100% or close to 100% in comp 2 can I still get an A? :C


The possibility question at the end pulled me down
Reply 6
Original post by MattBurd
The possibility question at the end pulled me down


I missed that out completely i just hope i can still make up for it :C...
For anyone who did do the possibility question did you get 47 % and then 43% of it being higher?
Reply 8
Original post by TobyTheFox
For anyone who did do the possibility question did you get 47 % and then 43% of it being higher?


I got 0.9something something, then I got 0.9. It didn't ask for percentages?
Original post by TobyTheFox
For anyone who did do the possibility question did you get 47 % and then 43% of it being higher?


Original post by Harjot
I got 0.9something something, then I got 0.9. It didn't ask for percentages?


I got 0.9...something and then 0.88. I was using Python, so I'm not sure how rounding works in other languages. I know I got floating-point values.
As for percentages, I think that might be acceptable, as long as you made it clear that's what they were - if you didn't add the percentage sign, you're definitely screwed.
Reply 10
Original post by StarvingAutist
I got 0.9...something and then 0.88. I was using Python, so I'm not sure how rounding works in other languages. I know I got floating-point values.
As for percentages, I think that might be acceptable, as long as you made it clear that's what they were - if you didn't add the percentage sign, you're definitely screwed.


I didn't round, however I reproduced my solution just now with a correction, and the probabilities should be : Press 2 --> Probability 1 --> Press y --> Probability 0.9 something --> Press y --> Probability 0.88.

Agree with the percentage sign thing. Depends on how moody the examiners are feeling.
Original post by Harjot
I didn't round, however I reproduced my solution just now with a correction, and the probabilities should be : Press 2 --> Probability 1 --> Press y --> Probability 0.9 something --> Press y --> Probability 0.88.

Agree with the percentage sign thing. Depends on how moody the examiners are feeling.


Phew, I'm feeling pretty confident about that then. I think the programming went well, even though I was kind of pissing myself about it - in class we did a few of the possible questions and one of them stumped me. I feel so lucky it didn't come up.
Reply 12
Original post by StarvingAutist
Phew, I'm feeling pretty confident about that then. I think the programming went well, even though I was kind of pissing myself about it - in class we did a few of the possible questions and one of them stumped me. I feel so lucky it didn't come up.


Yeah programming is generally no problem for me, I just have to watch out for silly mistakes and focus a bit more on the theory.
Original post by Harjot
Yeah programming is generally no problem for me, I just have to watch out for silly mistakes and focus a bit more on the theory.


That's the thing you see - usually I'll program away, no problem. But in that lesson, suddenly I couldn't do it that well! I was so worried. It must just have been a bad day or something, I suppose. I think I avoided silly mistakes this time around :crossedf:
Didn't do perfectly on the theory though haha. Loved that Gray code algorithm though, that was so bizarre.
Reply 14
Original post by StarvingAutist
That's the thing you see - usually I'll program away, no problem. But in that lesson, suddenly I couldn't do it that well! I was so worried. It must just have been a bad day or something, I suppose. I think I avoided silly mistakes this time around :crossedf:
Didn't do perfectly on the theory though haha. Loved that Gray code algorithm though, that was so bizarre.


Yep the Gray code algorithm looked completely random, I seriously wonder how they got that to produce Gray code. I think I made a silly mistake in the last question because my probabilities were wrong as I may have included one extra card in the number of cards left :frown: Still did everything else fine.

What did you put for the problem with the linear search algorithm?
Original post by Harjot
Yep the Gray code algorithm looked completely random, I seriously wonder how they got that to produce Gray code. I think I made a silly mistake in the last question because my probabilities were wrong as I may have included one extra card in the number of cards left :frown: Still did everything else fine.

What did you put for the problem with the linear search algorithm?


Ah, the mysteries of computing :biggrin:
What probabilities did you get? Mine were 0.9something and 0.88. I was confused for a bit because both came out as 0 at first, but then I remembered Python is just weird like that. Close call though.

I can't remember that question, what was it?
About the probability question, the first card was the Ace of Clubs and the second was the Two of Hearts. The suit order in the previous "IsNextCardHigher()" function was:
Clubs, Diamonds, Hearts, Spades
from lowest to highest.
Therefore the Ace of Clubs is the lowest possible card and thus the probability of the next card being higher is definitely 100%.
The Two of Hearts has 11 ranks above it (Three to King), each with 4 suits. In addition, the Two of Spades is higher than the Two of Hearts, so 11*4 + 1 cards are higher than the Two of Hearts out of the 50 remaining (since the Ace of Clubs is removed from the deck).
Therefore the second probability is:
(11 * 4 + 1) / 50 * 100 = 90% exactly.

If I'm wrong somewhere, feel free to point it out, but that was what I got. (P.S. I'm surprised so many people did the exam in VB.net or Pascal as opposed to Python. I have a weird affinity for Python for some reason.)
Reply 17
Original post by Harjot
Yep the Gray code algorithm looked completely random, I seriously wonder how they got that to produce Gray code.

I know right!? To me it was semi-obvious that it was something to do with grey code, but no matter how many times I tried to recalculate my dry-run answers, I always got a sequence that didn't look like it was part of Gray code.
Reply 18
Original post by StarvingAutist
Ah, the mysteries of computing :biggrin:
What probabilities did you get? Mine were 0.9something and 0.88. I was confused for a bit because both came out as 0 at first, but then I remembered Python is just weird like that. Close call though.

I can't remember that question, what was it?


I think I got what you got however below is correct. This is probably because we had an extra +1 lurking around somewhere

Original post by Rifleboy123
About the probability question, the first card was the Ace of Clubs and the second was the Two of Hearts. The suit order in the previous "IsNextCardHigher()" function was:
Clubs, Diamonds, Hearts, Spades
from lowest to highest.
Therefore the Ace of Clubs is the lowest possible card and thus the probability of the next card being higher is definitely 100%.
The Two of Hearts has 11 ranks above it (Three to King), each with 4 suits. In addition, the Two of Spades is higher than the Two of Hearts, so 11*4 + 1 cards are higher than the Two of Hearts out of the 50 remaining (since the Ace of Clubs is removed from the deck).
Therefore the second probability is:
(11 * 4 + 1) / 50 * 100 = 90% exactly.

If I'm wrong somewhere, feel free to point it out, but that was what I got. (P.S. I'm surprised so many people did the exam in VB.net or Pascal as opposed to Python. I have a weird affinity for Python for some reason.)


I wished I'd taken a second to understand what you said in the exam. Would've saved me a couple of marks.

I did Pascal/Delphi. Python to me seems like a good language if what you're making doesn't need to be seen by people, and is great at doing calculating stuff in a backend. Delphi at its current stage is severely underrated and certainly not as bad as people make it out to be. It is one of the most productive languages imo and great for indie development. I do not feel it is very scalable though. VB.Net is not something I am a fan of tbh. Just seems somewhat disgusting to me lol.
Reply 19
Original post by StarvingAutist
Ah, the mysteries of computing :biggrin:
What probabilities did you get? Mine were 0.9something and 0.88. I was confused for a bit because both came out as 0 at first, but then I remembered Python is just weird like that. Close call though.

I can't remember that question, what was it?


The question that searched for a name in recent scores which asked for the problem with the algorithm

Quick Reply

Latest