6) What is the difference between echo and print?
Main difference between echo() and print() is that echo is just an statement not a function and doesn't return's
value or it just prints a value whereas print() is an function which prints a value and also it returns value.
We cannot pass arguments to echo since it is just a statement whereas print is a function and we can pass
arguments to it and it returns true or false. print can be used as part of a more complex expression whereas
echo cannot. echo is marginally faster since it doesn't set a return value.
7) An examiner awards the highest mark 75 and the lowest mark 25, the pass marks being 40. The
moderator wants to change the highest mark to 250 and the lowest marks to 100 using the linear formula
y=ax+b. The revised pass marks will be:
A. 145
B. 150
C. 160
D. 400/3
Give the correct option.
y=ax+b
100=25a+b
250=75a+b
Solve it get and b and then put
y=40a+b
Answer: 145
8) A and B are shooters and having their exam. A and B fall short of 10 and 2 shots respectively to the
qualifying mark. If each of them fired at least one shot and even by adding their total score together, they fall
short of the qualifying mark, what is the qualifying mark?
Answer: 11
As A is short by 10 - he has shot 1
As B is short by 2 - he has shot 9
9+1=10 and 10 < 11
9) In objective test a correct answer score 4 marks and on a wrong answer 2 marks. A student scores 480
marks from 150 questions. How many answers were correct?
A. 120
B. 130
C. 110
D. 150
Answer: B i.e. 130
4x-2y=480
x+y=150
Then X is 130 so 130 is correct answer.
10) An INK bug starts jumping 1 meter to each direction north, south, east and west respectively. It marks a
point in the new locations. It comes back to its original point after jumping in all directions. It again starts the
same process from the newly drawn unique points. Totally how many points did the bug mark?
Main difference between echo() and print() is that echo is just an statement not a function and doesn't return's
value or it just prints a value whereas print() is an function which prints a value and also it returns value.
We cannot pass arguments to echo since it is just a statement whereas print is a function and we can pass
arguments to it and it returns true or false. print can be used as part of a more complex expression whereas
echo cannot. echo is marginally faster since it doesn't set a return value.
7) An examiner awards the highest mark 75 and the lowest mark 25, the pass marks being 40. The
moderator wants to change the highest mark to 250 and the lowest marks to 100 using the linear formula
y=ax+b. The revised pass marks will be:
A. 145
B. 150
C. 160
D. 400/3
Give the correct option.
y=ax+b
100=25a+b
250=75a+b
Solve it get and b and then put
y=40a+b
Answer: 145
8) A and B are shooters and having their exam. A and B fall short of 10 and 2 shots respectively to the
qualifying mark. If each of them fired at least one shot and even by adding their total score together, they fall
short of the qualifying mark, what is the qualifying mark?
Answer: 11
As A is short by 10 - he has shot 1
As B is short by 2 - he has shot 9
9+1=10 and 10 < 11
9) In objective test a correct answer score 4 marks and on a wrong answer 2 marks. A student scores 480
marks from 150 questions. How many answers were correct?
A. 120
B. 130
C. 110
D. 150
Answer: B i.e. 130
4x-2y=480
x+y=150
Then X is 130 so 130 is correct answer.
10) An INK bug starts jumping 1 meter to each direction north, south, east and west respectively. It marks a
point in the new locations. It comes back to its original point after jumping in all directions. It again starts the
same process from the newly drawn unique points. Totally how many points did the bug mark?
Comments
Post a Comment