Understanding Functional vs Non-Functional Requirements
📖 Scenario: You are part of a software development team planning a new mobile app for a local library. To make sure the app meets users' needs, you need to clearly list what the app should do and how well it should perform.
🎯 Goal: Build a clear list that separates functional requirements (what the app must do) from non-functional requirements (how the app should behave or perform).
📋 What You'll Learn
Create a dictionary called functional_requirements with exactly these entries: 'User login': 'Allow users to log in with email and password', 'Search books': 'Enable searching books by title, author, or ISBN', 'Borrow books': 'Allow users to borrow available books'
Create a dictionary called non_functional_requirements with exactly these entries: 'Performance': 'App should load pages within 2 seconds', 'Security': 'User data must be encrypted', 'Usability': 'App must be easy to navigate for all ages'
Create a list called all_requirements that combines the keys from both dictionaries in this order: functional requirements first, then non-functional requirements
Add a final statement as a string variable called summary that explains the difference between functional and non-functional requirements in one clear sentence
💡 Why This Matters
🌍 Real World
Software teams use functional and non-functional requirements to plan and build software that meets user needs and quality standards.
💼 Career
Understanding these requirements is essential for roles like business analysts, project managers, and software developers to ensure successful software delivery.
Progress0 / 4 steps
1
Create functional requirements dictionary
Create a dictionary called functional_requirements with these exact entries: 'User login': 'Allow users to log in with email and password', 'Search books': 'Enable searching books by title, author, or ISBN', and 'Borrow books': 'Allow users to borrow available books'.
Software Engineering
Hint
Use curly braces {} to create a dictionary with the exact keys and values given.
2
Create non-functional requirements dictionary
Create a dictionary called non_functional_requirements with these exact entries: 'Performance': 'App should load pages within 2 seconds', 'Security': 'User data must be encrypted', and 'Usability': 'App must be easy to navigate for all ages'.
Software Engineering
Hint
Use a dictionary just like in Step 1, but with the new keys and values.
3
Combine requirement keys into a list
Create a list called all_requirements that contains all keys from functional_requirements first, followed by all keys from non_functional_requirements, preserving their order.
Software Engineering
Hint
Use list() and .keys() to get keys from each dictionary, then add them together.
4
Add summary explaining the difference
Create a string variable called summary that explains the difference between functional and non-functional requirements in one clear sentence. For example, say that functional requirements describe what the system should do, while non-functional requirements describe how the system should perform or behave.
Software Engineering
Hint
Write a clear sentence as a string assigned to summary.
Practice
(1/5)
1. Which of the following best describes a functional requirement in software engineering?
easy
A. The look and feel of the user interface
B. A measure of how fast the system responds
C. A feature that specifies what the system should do
D. The hardware needed to run the software
Solution
Step 1: Understand the definition of functional requirements
Functional requirements describe specific behaviors or functions the system must perform.
Step 2: Match the option to the definition
A feature that specifies what the system should do states a feature specifying what the system should do, which matches the definition.
Final Answer:
A feature that specifies what the system should do -> Option C
Quick Check:
Functional requirement = What system does [OK]
Hint: Functional = what system does, Non-functional = how it does [OK]
Common Mistakes:
Confusing functional with non-functional requirements
Thinking performance is a functional requirement
Mixing hardware needs with software functions
2. Which of the following is an example of a non-functional requirement?
easy
A. The system must allow users to reset their password
B. The system should respond to user input within 2 seconds
C. The system must save user data to a database
D. The system must support login with username and password
Solution
Step 1: Identify non-functional requirements
Non-functional requirements describe how the system performs, such as speed or reliability.
Step 2: Evaluate each option
The system should respond to user input within 2 seconds specifies response time, which is a performance measure and thus non-functional.
Final Answer:
The system should respond to user input within 2 seconds -> Option B
Quick Check:
Non-functional = performance or behavior [OK]
Hint: Look for speed, usability, or reliability for non-functional [OK]
Common Mistakes:
Choosing features as non-functional requirements
Confusing functional actions with performance measures
Ignoring timing or quality aspects
3. Consider this statement: "The system shall encrypt all user data before saving." What type of requirement is this?
medium
A. Functional requirement
B. Non-functional requirement
C. Neither functional nor non-functional
D. Both functional and non-functional
Solution
Step 1: Analyze the statement's action
Encrypting data is a specific action the system must perform, describing what it does.
Step 2: Classify the requirement type
Since it describes a function (encryption), it is a functional requirement.
Final Answer:
Functional requirement -> Option A
Quick Check:
Encryption = system function = functional [OK]
Hint: If it describes a system action, it's functional [OK]
Common Mistakes:
Thinking encryption is a performance or quality aspect
Confusing security features with non-functional requirements
Selecting 'both' without clear reasoning
4. A software team wrote this requirement: "The system must be user-friendly." What is the main issue with this requirement?
medium
A. It describes a functional requirement incorrectly
B. It is a security requirement
C. It is a hardware requirement, not software
D. It is too vague and not measurable
Solution
Step 1: Understand the requirement's nature
"User-friendly" describes a quality but is subjective and lacks clear criteria.
Step 2: Identify the problem
Requirements must be clear and measurable; this one is vague and cannot be tested easily.
Final Answer:
It is too vague and not measurable -> Option D
Quick Check:
Good requirements = clear + measurable [OK]
Hint: Vague terms mean poor requirements [OK]
Common Mistakes:
Assuming all non-functional requirements are clear
Confusing vague qualities with functional features
Ignoring measurability in requirements
5. A project requires the system to handle 1000 users simultaneously and respond within 1 second. Which combination correctly classifies these requirements?
hard
A. "Handle 1000 users simultaneously" is functional; "respond within 1 second" is non-functional
B. "Handle 1000 users simultaneously" is non-functional; "respond within 1 second" is functional