AQA Computing COMP 3- 22nd June 2016 [Exam Discussion] Watch

Swizzas
Badges: 0
Rep:
?
#41
Report 3 years ago
#41
(Original post by RedRum99)
Did
every one get -1344 or something like that for the floating point question?
Yes
0
reply
Swizzas
Badges: 0
Rep:
?
#42
Report 3 years ago
#42
Did anyone do a(ba|c)* for the last question?
0
reply
RedRum99
Badges: 2
Rep:
?
#43
Report 3 years ago
#43
(Original post by Swizzas)
Did anyone do a(ba|c)* for the last question?
I thought it was just ac*
0
reply
TercioOfParma
Badges: 18
Rep:
?
#44
Report 3 years ago
#44
(Original post by RedRum99)
Did everyone get -1344 or something like that for the floating point question?
Yeah
0
reply
TercioOfParma
Badges: 18
Rep:
?
#45
Report 3 years ago
#45
(Original post by Swizzas)
Did anyone do a(ba|c)* for the last question?
I got a(ba)*c*
0
reply
Mav1
Badges: 3
Rep:
?
#46
Report 3 years ago
#46
(Original post by TercioOfParma)
I got a(ba)*c*
This is incorrect, unfortunately, as the "ba"s and "c"s could be mixed in any order so the correct answer would be a(ba|c)*.
0
reply
cybernatural
Badges: 1
Rep:
?
#47
Report 3 years ago
#47
(Original post by Swizzas)
Did anyone do a(ba|c)* for the last question?
Definitely a(ba|c)* yeah
0
reply
TercioOfParma
Badges: 18
Rep:
?
#48
Report 3 years ago
#48
(Original post by Mav1)
This is incorrect, unfortunately, as the "ba"s and "c"s could be mixed in any order so the correct answer would be a(ba|c)*.
Well, you could go accbac and that doesn't match so it can't be that either.
0
reply
Mav1
Badges: 3
Rep:
?
#49
Report 3 years ago
#49
(Original post by TercioOfParma)
Well, you could go accbac and that doesn't match so it can't be that either.
That string would be accepted by the FSM and fits the rule.
0
reply
TercioOfParma
Badges: 18
Rep:
?
#50
Report 3 years ago
#50
(Original post by Mav1)
That string would be accepted by the FSM.
Yes, but it wouldn't be accepted by that regex.
0
reply
cybernatural
Badges: 1
Rep:
?
#51
Report 3 years ago
#51
(Original post by TercioOfParma)
Well, you could go accbac and that doesn't match so it can't be that either.
a(ba|c)* means it can go
a ba c
a c ba
a c ba c
a ba c ba
etc, so accbac is accepted
0
reply
TercioOfParma
Badges: 18
Rep:
?
#52
Report 3 years ago
#52
(Original post by cybernatural)
a(ba|c)* means it can go
a ba c
a c ba
a c ba c
a ba c ba
etc, so accbac is accepted
Are you sure? I think that just means ababa or acc. I don't know for certain honestly, I know I got it wrong regardless

Edit: Just checked yeah that works.
0
reply
Mav1
Badges: 3
Rep:
?
#53
Report 3 years ago
#53
(Original post by TercioOfParma)
Yes, but it wouldn't be accepted by that regex.
It would be, I think the confusion arises as you might not understand (ba|c)*. This does NOT mean choose ba or c then repeat that. It mean many choices of ba or c.
0
reply
Bunderwump
Badges: 7
Rep:
?
#54
Report 3 years ago
#54
Does anybody remember the diagram for the regex in the last question? I just wrote ac* - I think I may have missed a b that returns to the first state.

Some areas which caused my class confusion:

For the SQL query question, you only needed the data described in the question, so the customer table was not needed. To get the correct price, you needed to compare the weight in the parcel to the min and max values in the price bands. No clue whether it should be ascending or descending - the question asked for the oldest date "at the top of the list" but I don't if top to bottom or bottom to top is "ascending".

For the DeleteItem procedure (pseudocode in the linked list question), you need to take into account if the first item in the list was the item to be deleted. Then you cannot change Previous and instead set Start = Current.Next. I also took into account if the item was the last in the list, so you would have to set Previous.Next to a null pointer, but I'm not sure if that would be required.
0
reply
TercioOfParma
Badges: 18
Rep:
?
#55
Report 3 years ago
#55
(Original post by Bunderwump)
For the DeleteItem procedure (pseudocode in the linked list question), you need to take into account if the first item in the list was the item to be deleted. Then you cannot change Previous and instead set Start = Current. I also took into account if the item was the last in the list, so you would have to set Previous.Next to a null pointer, but I'm not sure if that would be required.
I thought you had to delete the item that had the value supplied as the parameter.
0
reply
Louisb19
Badges: 14
Rep:
?
#56
Report 3 years ago
#56
(Original post by RedRum99)
I thought it was just ac*
Thats what I did.
0
reply
Bunderwump
Badges: 7
Rep:
?
#57
Report 3 years ago
#57
(Original post by TercioOfParma)
I thought you had to delete the item that had the value supplied as the parameter.
You're right, there's a mistake in my explanation. You set Start = Current.Next if Current is the first in the list.
0
reply
TercioOfParma
Badges: 18
Rep:
?
#58
Report 3 years ago
#58
(Original post by Bunderwump)
You're right, there's a mistake in my explanation. You set Start = Current.Next if Current is the first in the list.
I didn't use start at all in the loop, I set current and previous to start (to avoid null pointer issues) and simply assigned current to current.next and previous to current afterwards.
0
reply
1TrueMeaning
Badges: 12
Rep:
?
#59
Report 3 years ago
#59


We had to have one of these.
0
reply
Bunderwump
Badges: 7
Rep:
?
#60
Report 3 years ago
#60
(Original post by TercioOfParma)
I didn't use start at all in the loop, I set current and previous to start (to avoid null pointer issues) and simply assigned current to current.next and previous to current afterwards.
That's right (you don't have to set previous to start depending on how you coded it afterwards) but if the element you need to delete is the first in the list, then you need to change the value of Start to the new start of the list (which would be Start.Next or Current.Next) - otherwise Start will be a null pointer after the procedure has finished.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts

All the exam results help you need

1,828

people online now

225,530

students helped last year

University open days

  • University of Dundee
    Undergraduate Open Day Undergraduate
    Mon, 26 Aug '19
  • University of Aberdeen
    General Open Day Undergraduate
    Tue, 27 Aug '19
  • Norwich University of the Arts
    Postgraduate (MA) Open Day Postgraduate
    Sat, 31 Aug '19

How are you feeling about GCSE Results Day?

Hopeful (204)
12.73%
Excited (139)
8.67%
Worried (291)
18.15%
Terrified (364)
22.71%
Meh (144)
8.98%
Confused (35)
2.18%
Putting on a brave face (221)
13.79%
Impatient (205)
12.79%

Watched Threads

View All
Latest
My Feed