Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
4.4. Declarative Programming Paradigm
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the main difference between declarative and procedural programming?
Hint
Think about the focus of each paradigm.
- 2.
Name one example of logic programming.
Hint
Consider a language known for its use with facts and rules.
- 3.
What does declarative programming emphasize?
- How to do tasks
- What to achieve
- Only functions
Hint
Remember the primary difference from procedural programming.
- 4.
True or False: SQL is an example of imperative programming.
- True
- False
Hint
Focus on the nature of SQL's statements.
- 5.
Create a SQL query to find all students younger than 18 years old from a table named
Students.Hint
Use the SELECT statement to fetch names, filtering with WHERE clause.
- 6.
Design a simple logic problem in Prolog where you define a parent-child relationship and create a rule to find all children of a given parent.
Hint
Use ':-' to define rules and facts about relationships.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting