Ai- Lab#08_task_solution

  • Uploaded by: Babar Khan
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ai- Lab#08_task_solution as PDF for free.

More details

  • Words: 493
  • Pages: 3
CE-401 ARTIFICIAL INTELLIGENCE & ROBOTICS LAB # 08 TASK # 01

CODING: question number Please enter a number; input integer ; % only accepts integers because I will print a table of that number for you. question range_s Please enter the range (Start) for the table; input integer ; % only accepts integers because Table Starting RANGE. question range_e Please enter the range (End) for the table; input integer ; % only accepts integers because Table Ending RANGE. action print_table ; do ask number and do ask range_s and do ask range_e and do for N from range_s to range_e do write(' ') and write(number) and write(' x ') and do write(N) and do write(' = ') and do write(N * number) and nl end for.

TASK # 02

CODING: question your_name Please enter your name ; input name ; because I would like to call you personally. question your_city Please enter your city ; input name ; because I would like to know where do you live. question your_country Please enter your country ; input name ; because I would like to know where are you from. question your_inst Please enter your institution ; input name ; because I would like to know where do you study. question your_cname Please enter your course title ; input name ; because I would like to know what do you study. question your_ccode Please enter your course code ; input name ; because I would like to know the course code. question your_teacher Please enter your teacher name ; input name ; because I would like to know what do you study. question your_dept Please enter your department name ; input name ; because I would like to know what do you study. frame base ; default name is your_name and default city is your_city and default country is your_country and default inst is your_inst and default cname is your_cname. instance derived1 is a base ; ccode is your_ccode and teacher is your_teacher.

instance derived2 is a base ; dept is your_dept. action exec_prog ; do ask your_name and do ask your_city and do ask your_country and do ask your_inst and do ask your_cname and do ask your_ccode and do ask your_teacher and do ask your_dept and do write (' base') and nl and do write('Name: ') and write( base`s name ) and nl and do write('City: ') and write( base`s city ) and nl and do write('Country: ') and write( base`s country ) and nl and do write('Institution: ') and write( base`s inst ) and nl and do write('Course Name: ') and write( base`s cname ) and nl and do for every S is an instance of base do write (' ') and write(S) and nl and do write('Course Code: ') and write( S`s ccode ) and nl and do write('Teacher Name: ') and write( S`s teacher ) and nl and do write('Department: ') and write( S`s dept ) and nl end for .

Related Documents

Ai
November 2019 69
Ai
November 2019 69
Ai
December 2019 60
Ai
October 2019 71
Ai
June 2020 23
Ai
May 2020 24

More Documents from ""

Arnold Training Chest
November 2019 26
Lecture Template
November 2019 16
Watts Va Confusion
November 2019 23
Lab Report Template
November 2019 28
Index Template
November 2019 19