Sie sind auf Seite 1von 5

LONDON WESTMINSTER COLLEGE – BATTICALA

Advance Diploma in Computer Systems Technology


MIT 153: INTRODUCTORY PROGRAMMING LOGIC

End Semester Examination

Lab Test Instruction / Description


For Lab Test 1 &2

1. In lab test 1 & 2, you are required to write a program and ssave it to the folder in Desktop
with your index number/name.

2. A test sheet will be given, which lists the tasks, instructions and a marking schedule. You will
need to finish the lab exercise in two hrs.

3. Each lab test is worth 50% of your final mark.

4. No one should be admitted to a lab session if he/she is more than 5 minutes late. No one is
allowed to leave in the last 5 minutes of a lab session.

5. You are seated according to your booking number. Please check the booking number from
exam branch or our course page on the date of the labtest.

6. Lab tests are open-book tests, i.e. books, lecture notes and MSDN library are allowed.

7. During the lab test, you are NOT ALLOWED to communicate with other people (e.g. talking to
each other, using mobile phone, sending E-mail and so on)
Test 1 : Section A

1. All Lab works has to document appropriately, apply professional coding standards by writing
clear code and use the clear and concise comments that correctly explain the intent of a
programs code. [LOC 5] [ 10 marks]

2. Write a JavaScript program to display the following


a) “Welcome Westminster College”
b) 2 + 3 *5 = 17
c) Display your name ,age and born city
[LOC 2] [5 marks]

3. Write a JavaScript program to display the current day and time in the following format.
Sample Output:
Today is Friday.
Current time is 4 PM: 50: 22 [LOC 2] [10 marks]

4. Write a JavaScript program to check the total marks of a student in various examinations.
The student will get A+ grade in “Mid Exam”, if the total marks are in the range 89...100
inclusive, if the examination is "Final-exam.”, the student will get A+ grade and total marks
must be greater than or equal to 90. Return true if the student get A+ grade or false otherwise.
[LOC 2] [10 marks]

5. Write a JavaScript program which compute, the average marks of the following students then,
this average is used to determine the corresponding grade and number of marks restricted to
five students only ,the program has to ask continually to enter the marks until five entry.

Student NameMarks
80
77
88
95
68

Range Grade
<60 F
<70 D
<80 C
<90 B
<100 A
[LOC 2] [15 marks]
Test 2 : Section B (all solution should have JavaScript program and able to run)

1. With the help of built-in functions, write a JavaScript function reverse (n) that reverse a
number and n is the number.
Example x = 32243;
Expected Output: 34223
Call the function three times with different sets of values.
Help: you can use following functions
Split ()
Reverse ().
Join ()
[LOC 4] [10 marks]

2. Write a function named calculateDogAge that:


 Takes 1 argument: your puppy's age.
 Calculates your dog's age based on the conversion rate of 1 human year to 7 dog years.
 Outputs the result to the screen like so: "Your doggie is NN years old in dog years!"
 Call the function three times with different sets of values.
[LOC 4] [10 marks]

3. There are two arrays with individual values, write a JavaScript program to compute the sum
of each individual index value from the given arrays.
Sample array :
array1 = [1,0,2,3,4];
array2 = [3,5,6,7,8,13];
Expected Output :
[4, 5, 8, 10, 12, 13]
[LOC 6] [15 marks]

4. Covert your program in section A Question 5 by using the array


Write a JavaScript program which compute, the average marks of the following students then, this
average is used to determine the corresponding grade and number of marks restricted to five students
only ,the program has to ask continually to enter the marks until five entry.
Student Name Marks
David 80
Vinoth 77
Divya 88
Ishitha 95
Thomas 68

Range Grade
<60 F
<70 D
<80 C
<90 B
<100 A

[LOC 6] [15 marks]


Observation record
Learner name/index no

Qualification Advance Diploma in Computer Systems Technology

Unit number and title MIT 153: INTRODUCTORY PROGRAMMING LOGIC

Assignment Lab Test

Description of activity undertaken (please be as specific as possible)

See the attachment

Assessment and grading criteria

LOC 2, 4,5 and 6

How the activity meets the requirements of the assessment and grading criteria

Learner Signature: Date

Assessor Signature: Date

Assessor Name:
Witness record
Learner name/index no

Qualification Advance Diploma in Computer Systems Technology

Unit number and title MIT 153: INTRODUCTORY PROGRAMMING LOGIC

Assignment Lab Test

Description of activity undertaken (please be as specific as possible)

See the attachment

Assessment and grading criteria

LOC 2, 4,5 and 6

How the activity meets the requirements of the assessment and grading criteria

Witness Name Job role

Witness Signature: Date

Learner name:

Learner Signature: Date

Assessor Name:

Assessor Signature: Date

Das könnte Ihnen auch gefallen