Intro to Programming Languages

LecLabs 5.0 Prolog

[ ← Module List ]

18 challenges

Challenges

CHALLENGE 01

Lecture 5.1.1.1 Introduction to Prolog

— solves

Lecture video introducing Prolog

CHALLENGE 02

Lecture 5.1.2.3 Facts

— solves

Lecture video introducing Prolog facts

CHALLENGE 03

Lecture 5.1.2.4 Rules

— solves

Lecture video introducing Prolog rules

CHALLENGE 05

Lab 5.1.2 - Romeo and Juliet's Love

— solves

Objective

Create a query that asks whether Romeo loves Juliet

Click Here for Follow Along Video

Requirements

Add a query 1 to the main.pl asking whether Romeo loves Juliet
CHALLENGE 06

Lecture 5.1.3.1 Operators

— solves

Lecture video on Prolog operators

CHALLENGE 07

Lab 5.1.3a - List Females and Males using listing

— solves

Objective

Create a query for females and males and use listing to print them out.

Click Here for Follow Along Video

Requirements

Follow the instructions of the CODE comments
CHALLENGE 08

Lab 5.1.3b - Iffy Queries

— solves

Objective

Create several if statements

Click Here for Follow Along Video

Requirements

Follow the instructions of the CODE comments
CHALLENGE 09

Lecture 5.2.1.1 Recursion

— solves

Lecture video using recursion in Prolog

CHALLENGE 10

Lecture 5.2.1.2 Recursive Rules

— solves

Lecture video covering recursive rules in Prolog

CHALLENGE 11

Lecture 5.2.1.3 Graphs

— solves

Lecture video querying graphs in Prolog

CHALLENGE 12

Lecture 5.2.1.3 Map Coloring

— solves

Lecture video on practically applying Prolog to a map coloring problem

CHALLENGE 13

Lab 5.2.1.1 - ancestors

— solves

Objective

Create queries and rules finding the relationship between people.

Click Here for Follow Along Video

Requirements

Follow the instructions of the CODE comments
CHALLENGE 14

Lecture 5.2.1.3 Map Coloring

— solves

Lecture video on practically applying Prolog to a map coloring problem

CHALLENGE 15

Lecture 5.2.1.3 Coin Machine

— solves

Lecture video covering the coin machine example using lists in Prolog

CHALLENGE 16

Lecture 5.2.1.3 Sort Example

— solves

Lecture video covering a quick sort example using lists in Prolog

CHALLENGE 17

Lecture 5.2.2.4 Other Examples

— solves

Lecture video covering other examples using lists in Prolog

CHALLENGE 18

Lab 5.2.2 - List people using findall

— solves

Objective

Create a query for females and males and use findall to load it into a variable and write it.

Click Here for Follow Along Video

Requirements

Follow the instructions of the CODE comments