The Student Room Group

A-level Computing/AQA/Paper 1/Skeleton program/2018 WORDS WITH AQA

Scroll to see replies

What's the purpose of the 'Word' parameter? Why not just use 'Choice'? Does it store the word being played?
Reply 81
any guesses on what they'll ask us for section C?
they asked to program run length encoding last year
I think they might ask the check digit bit.
(edited 5 years ago)
Does anyone have any tips for understanding the code and struggling with syntax? Thanks :/
Original post by andrew9204
Does anyone have any tips for understanding the code and struggling with syntax? Thanks :/



There’s an attachment of the explanation of the code in the 1st or 2nd page
How likely is it that one of the ZigZag questions will come up tomorrow?
Original post by Gxthx
How likely is it that one of the ZigZag questions will come up tomorrow?

Dude, u r talking about one. I am totally dependent upon zigzag at the moment.
Original post by AamirSonu
Dude, u r talking about one. I am totally dependent upon zigzag at the moment.


So am I tbh, hence I asked.

I really need something from it to come up.
Original post by Hammad(214508)
I have got the 15 Zig Zag questions, I will be posting the solutions as a word document here. I can't be asked to put them on WIkibooks


Can you send me the ZigZag questions please
Original post by whichisbetter
Can you send me the ZigZag questions please


..
Original post by Gxthx
..


Thanks!
@Gxthx @AamirSonu do u guys know how to do Task 8 and Task 14?
Original post by mrz4073
@Gxthx @AamirSonu do u guys know how to do Task 8 and Task 14?


I followed the solution for task 8:

Screenshot_1.png

(thanks to whoever did that!)

and haven't done 14 yet.
Original post by Gxthx
I followed the solution for task 8:

Screenshot_1.png

(thanks to whoever did that!)

and haven't done 14 yet.


ahh i'm doing vb.net. if you understand the code could you please explain it?
Task 14:

Added a new property called _TileCount that keeps track of total number of tiles added so far. Then modified the Add method so that RandNo was either a random int between 0 and 25 (if _TileCount is 1 or 2), a random choice from 0, 4, 8, 14, 20 (if _TileCount is multiple of 3) or a random int between 0 and 25 that is NOT either 0, 4, 8, 14, 20 otherwise. A while loop is used to choose RandNo until it is not 0, 4, 8, 14, 20.

0, 4, 8, 14, 20 are the relative positions of the vowels.

I think these are right I just redid the q x
Original post by mrz4073
ahh i'm doing vb.net. if you understand the code could you please explain it?


I'll go thru it line by line from Gxthx's answer, not sure which bit you don't get so sorry if I make it too basic :smile:
Line 1 : This is the method Add - adds a new tile to the string
Line 2 : This chooses a random number between 0 and 25 inclusive - the number represents a letter from a to z (with a being 0 and z being 25)
Line 3 : This line is wrong. It should loop whilst the two ARE equal, not whilst the two are NOT equal.
Line 4 : This line is wrong. This will repeatedly add more letters to the queue instead of regenerating a random number.
Line 5 : This line is also wrong. Both lines 4 and 5 should be outside the while loop

Amended code:
Line 4 : This loops through to ensure that the chosen RandNo gives a different letter to the current last letter in the queue. The chr(n) function returns the character with the ASCII value of n (no idea what the equivalent of this in VB is). 65 is added as the character "A" has ASCII value 65, and "B" 66 and so on.
Line 5 : The RandNo is regenerated until it represents a letter different to the last letter in the queue
Line 6&7 : This is the same as before, the Rear pointer is incremented and the new letter is added to the end of the queue.

Hope this helps both of you and let me know if I'm wrong haha, I ran it once and it seemed okay but
Original post by danarmstrong
I'll go thru it line by line from Gxthx's answer, not sure which bit you don't get so sorry if I make it too basic :smile:
Line 1 : This is the method Add - adds a new tile to the string
Line 2 : This chooses a random number between 0 and 25 inclusive - the number represents a letter from a to z (with a being 0 and z being 25)
Line 3 : This line is wrong. It should loop whilst the two ARE equal, not whilst the two are NOT equal.
Line 4 : This line is wrong. This will repeatedly add more letters to the queue instead of regenerating a random number.
Line 5 : This line is also wrong. Both lines 4 and 5 should be outside the while loop

Amended code:
Line 4 : This loops through to ensure that the chosen RandNo gives a different letter to the current last letter in the queue. The chr(n) function returns the character with the ASCII value of n (no idea what the equivalent of this in VB is). 65 is added as the character "A" has ASCII value 65, and "B" 66 and so on.
Line 5 : The RandNo is regenerated until it represents a letter different to the last letter in the queue
Line 6&7 : This is the same as before, the Rear pointer is incremented and the new letter is added to the end of the queue.

Hope this helps both of you and let me know if I'm wrong haha, I ran it once and it seemed okay but


I'm gonna let you take the lead here as I haven't had a programming teacher for my a-levels. Thanks !
Original post by danarmstrong
I'll go thru it line by line from Gxthx's answer, not sure which bit you don't get so sorry if I make it too basic :smile:
Line 1 : This is the method Add - adds a new tile to the string
Line 2 : This chooses a random number between 0 and 25 inclusive - the number represents a letter from a to z (with a being 0 and z being 25)
Line 3 : This line is wrong. It should loop whilst the two ARE equal, not whilst the two are NOT equal.
Line 4 : This line is wrong. This will repeatedly add more letters to the queue instead of regenerating a random number.
Line 5 : This line is also wrong. Both lines 4 and 5 should be outside the while loop

Amended code:
Line 4 : This loops through to ensure that the chosen RandNo gives a different letter to the current last letter in the queue. The chr(n) function returns the character with the ASCII value of n (no idea what the equivalent of this in VB is). 65 is added as the character "A" has ASCII value 65, and "B" 66 and so on.
Line 5 : The RandNo is regenerated until it represents a letter different to the last letter in the queue
Line 6&7 : This is the same as before, the Rear pointer is incremented and the new letter is added to the end of the queue.

Hope this helps both of you and let me know if I'm wrong haha, I ran it once and it seemed okay but


Why should they be equal in the while loop?
Original post by Gxthx
I'm gonna let you take the lead here as I haven't had a programming teacher for my a-levels. Thanks !


No worries:smile: I thought explaining my code might be good practice for tomorrow haha good luck, can't believe you don't have a coding teacher tho thats maddd
Original post by danarmstrong
No worries:smile: I thought explaining my code might be good practice for tomorrow haha good luck, can't believe you don't have a coding teacher tho thats maddd


My school is a joke, they hire anybody as a teacher. Honestly, any help is appreciated ! Thank you, & you too!:smile:

Quick Reply

Latest

Trending

Trending