Professional Documents
Culture Documents
Bahria University, Islamabad Campus: Department of E&ES
Bahria University, Islamabad Campus: Department of E&ES
Bahria University, Islamabad Campus: Department of E&ES
Department of E&ES
Mid Term Assessment
Class/Section: BS Geo 3S
(Summer 2020)
Assessment Type: Take Home Assignment
INSTRUCTIONS:
I. All tasks have to be carried out individually and independently.
II. Attempt all tasks/questions. Late submissions will be marked 0. Submission on LMS is mandatory on
or before the due date mentioned above.
III. Plagiarism and copied submissions will not be accepted. Such cases will be considered as cheating
cases as per Examination Rules of BU and will be penalized accordingly. Copying from the internet
will cause problems for you.
IV. Clearly mention your Enrollment No, Name, Subject and Class on your submissions.
V. The name of the file should be your enrollment number in the format 01-1311xx-0xx and then your
name. For example: “01-131192-020 Ali Khan”
VI. All students must appear for viva or zero marks would be awarded.
VII. Every question has marks for viva and plagiarism.
Take a number from the user and check if the number is even or odd.
If the first number is even, ask the user to enter another number.
o If the second number is positive, display on the screen “EP”.
o If the second number is negative, display on the screen “EN”.
If the first number was odd, ask the user to enter another number.
o If the second number is divisible by 5, display on the screen “O5”.
o If the second number is divisible by 3, display on the screen “O3”.
o If the second number is divisible by 3&5 both, display on the screen “O35”.
o Otherwise display on the screen “Odd”
The check on the first number must be done with switch. The check on the second number must be done by if.
Take a number from the user and display its table. You have to ask the user that from which number to which
number the table has to be displayed. The table must be in proper format as taught in the class. Validation of
numbers must be done otherwise, if the numbers are in wrong format, the table should not be printed.