Case Study Set 2 - Marking Guide
Case Study Set 2 - Marking Guide
Paix-Travail-Patrie Peace-Work-Fatherland
MINISTERE MINISTRY
DE l’ENSEIGNMENT SUPERIEUR OF HIGHER EDUCATION
Instructions: Answer all questions. You are authorized to use only non-programmable
calculator.
We change our low to mid + 1 and find the new mid value again.
low = mid + 1
mid = low + (high - low) / 2
Our new mid is 7 now. We compare the value stored at location 7 with our target value 31.
The value stored at location 7 is not a match, rather it is more than what we +are looking for.
So, the value must be in the lower part from this location.
We compare the value stored at location 5 with our target value. We find that it is a match.
1. console.writeline() prints the results on the screen and causes the cursor to move to the ne xt
line while console.write() prints the output to the screen and causes the cursor to remain on the
same line.
2. console.readkey() prevents the console from disappearing almost immediately when printing
the results.
3. syntax error – grammatical programming error like omitting a semicolon
3 <body>
4 <video width = “300” height = “250” controls>
7 </body>
8 </html>
For Audio:
Example to Embed an Audio in HTML5 is shown below.
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <audio controls>
5 <source src = “song.mp3” type = “audio/mpeg”>
6 </audio>
7 </body>
8 </html>
2. Most frequectly used API
o Media API
o Data Transfer API
o Application Cache API
o User Interaction
o History API
o Constraint Validation API
o Command API
o Text Track API