You are on page 1of 2

Riphah International University, Islamabad

Faculty of Computing
Artificial Intelligence Lab
Marks 30 Time allowed: 180mins Dated: 16-04-20201

Q1: Initialize the variable a and b and print the output of the following programmed.

Q2: Write a program which iterates from 1 to 100. For multiples of three print
"Multiple of three" instead of the number and for the multiples of five print
"Multiply of 5". For numbers which are multiples of both three and five print
"Wow, it’s amazing" and print the number for the default case.

Q3: Create a class name Teacher having following attributes Name,


Qualification, Designation ,unique ID, InstitutionName and address and
perform the tasks like Take class, Make Assessment, Take Attendance,
Enrolled Students. We have another class name Students with Name, unique
ID, InstitutionName and address and the function performed by the students
should be Take class, obtain grades and Select course. Implement the above
scenarios through Inheritance techniques.

Q4: Perform the depth first Search for the following graph and find the
possible paths for the graph. Start and destination points are given against
each student.
Abubakkar, Muhammad Start Point Destination Point
Ahmad, Uzair 0 4
Ahsan Kamal, Muhammad

Ali, Mubeen Start Point Destination Point


Ali, Rahat 3 7
Ali Abbas, Aizaz

Iqbal, Fahad Start Point Destination Point


Bin Tahir, Haris 4 0
Danish Iqbal, Muhammad

Faisal, Hassan Start Point Destination Point


Farhan, Muhammad 7 3
Imtiaz, Jamal

Mehmood, Awais Start Point Destination Point


Zahid, Ahmed 5 1
Usman Ul Ehsan, Muhammad

Murtaza, Ahsan Start Point Destination Point


Ali Nawaz, Aqib 1 5
Muhammad Ibrahim Bukhari, Syed
Muhammad Huzaifa Munib, Malik Start Point Destination Point
Misam Abbas, Syed 6 2

Good luck

You might also like