• We need your support!

    We are currently struggling to cover the operational costs of Xtremepapers, as a result we might have to shut this website down. Please donate if we have helped you and help make a difference in other students' lives!
    Click here to Donate Now (View Announcement)

Computer Studies Notes + Tips + Queries

Messages
70
Reaction score
142
Points
43
Number of places left=x
Repeat
Input n
If n>1 and n<10
then x=x-n
Else Output ''Number of people exceed number of vacancies left''
Until x=0
Output ''No more vacancies left anymore''
This is what I wrote. This is correct, right? ._.
FLRNAB Help, computer distinction guy?
 
Messages
657
Reaction score
1,447
Points
143
Number of places left=x
Repeat
Input n
If n>1 and n<10
then x=x-n
Else Output ''Number of people exceed number of vacancies left''
Until x=0
Output ''No more vacancies left anymore''
This is what I wrote. This is correct, right? ._.
FLRNAB Help, computer distinction guy?
Yeah Correct but I don't know about the loop I didn't add one.
 
Messages
657
Reaction score
1,447
Points
143
Oh shut the front door! CIEs gonna be licking your *** : P
Distinction was like this:
giphy.gif

Came, Saw, Gone
 
Messages
1,243
Reaction score
1,891
Points
173
Number of places left=x
Repeat
Input n
If n>1 and n<10
then x=x-n
Else Output ''Number of people exceed number of vacancies left''
Until x=0
Output ''No more vacancies left anymore''
This is what I wrote. This is correct, right? ._.
FLRNAB Help, computer distinction guy?
Some probs here and there:
firstly 1 and 10 needed to be added...Don't worry shud be no prob on this one...not greater or smaller sign but like this >=
2ndly We shud not define the original number of places as already stored but I get wht u intend tht this basically can be any value so
the first 2 probs r for me still negligible
but here,s what u shud not hav done....
The condition was tht no ppl entered >=1 and <= number of available bookings not 10
Doing this means tht whenever another booking is made by diff customers it will take the value of 10 as condition and not number of ppl
This will cause a prob here:
Suppose after one booking x=8
now inputting n as 9 satisfies ur condition n>1 and n<10 giving x=8-9=-1!
 
Messages
70
Reaction score
142
Points
43
Some probs here and there:
firstly 1 and 10 needed to be added...Don't worry shud be no prob on this one...not greater or smaller sign but like this >=
2ndly We shud not define the original number of places as already stored but I get wht u intend tht this basically can be any value so
the first 2 probs r for me still negligible
but here,s what u shud not hav done....
The condition was tht no ppl entered >=1 and <= number of available bookings not 10
Doing this means tht whenever another booking is made by diff customers it will take the value of 10 as condition and not number of ppl
This will cause a prob here:
Suppose after one booking x=8
now inputting n as 9 satisfies ur condition n>1 and n<10 giving x=8-9=-1!
You're right. I should've added "AND n<x" in the code. (I did add equal signs in inequalities, but omitted 'em here)
But since I added "Until x=0", It'll never reach a negative value. Offc it wont show that it ran out of X before booking all the people either :|.
And for the value of x, I read a Q in ATP that said something like "you can assume the value of PRICE to be predefined" or something. And there was no other way to do anything else here :|. Lets hope the examiner doesn't look too deep into this : D
 
Messages
1,243
Reaction score
1,891
Points
173
You're right. I should've added "AND n<x" in the code. (I did add equal signs in inequalities, but omitted 'em here)
But since I added "Until x=0", It'll never reach a negative value. Offc it wont show that it ran out of X before booking all the people either :|.
And for the value of x, I read a Q in ATP that said something like "you can assume the value of PRICE to be predefined" or something. And there was no other way to do anything else here :|. Lets hope the examiner doesn't look too deep into this : D
Yeah value x shud not be sth to think abt but abt reaching 0 u wrote tht until X= 0 so if the value jumps btw it then still more probs
 
Messages
3
Reaction score
0
Points
1
Can i please know any easy way of remembering the theory parts . Like the fetch execute cycle ..... Any help is very much appreciated.... ☺️
 
Top