Draw a folder hierarchy diagram for the following structure:
- Root folder named 'Documents'
- Inside 'Documents', create two folders: 'Work' and 'Personal'
- Inside 'Work', create two folders: 'Projects' and 'Reports'
- Inside 'Personal', create one folder: 'Photos'
Then, write the full path to the 'Reports' folder assuming the root is 'C:\'.
10 minutes
Hint 1
Hint 2
Hint 3
Grading Criteria
Root folder 'Documents' is at the top
'Work' and 'Personal' folders are shown inside 'Documents'
'Projects' and 'Reports' folders are inside 'Work'
'Photos' folder is inside 'Personal'
Folder connections or indentation clearly show hierarchy
Full path to 'Reports' is correctly written as 'C:\\Documents\\Work\\Reports'
Solution
Documents
├── Work
│ ├── Projects
│ └── Reports
└── Personal
└── Photos
Full path to 'Reports': C:\\Documents\\Work\\Reports
This diagram shows the folder hierarchy starting from the root folder named 'Documents'. The vertical lines and branches show which folders are inside others.
The 'Work' and 'Personal' folders are inside 'Documents'. Inside 'Work', there are 'Projects' and 'Reports'. Inside 'Personal', there is 'Photos'.
The full path to the 'Reports' folder starts from the root drive 'C:\\', then goes into 'Documents', then 'Work', and finally 'Reports'. Each folder is separated by a backslash '\\'.
Variations - 2 Challenges
[intermediate] Draw a folder hierarchy diagram for this structure:
- Root folder 'Music'
- Inside 'Music', folders 'Rock' and 'Jazz'
- Inside 'Rock', folders 'Classic' and 'Modern'
- Inside 'Jazz', folder 'Smooth'
Write the full path to the 'Modern' folder assuming root is '/home/user/'.
[advanced] Draw a folder hierarchy diagram for this structure:
- Root folder 'Photos'
- Inside 'Photos', folders 'Vacations', 'Family', and 'Events'
- Inside 'Vacations', folders '2022' and '2023'
- Inside 'Events', folders 'Weddings' and 'Birthdays'
Write the full path to the 'Weddings' folder assuming root is 'D:\'.
Practice
(1/5)
1. What does a folder path describe in a computer system?
easy
A. The color of a folder icon
B. The size of a file
C. The location of a file or folder within the folder hierarchy
D. The speed of the computer
Solution
Step 1: Understand folder hierarchy
Folders are like drawers in a cabinet, organizing files and other folders.
Step 2: Define folder path
A folder path tells the computer exactly where to find a file or folder within this hierarchy.
Final Answer:
The location of a file or folder within the folder hierarchy -> Option C
Quick Check:
Folder path = location [OK]
Hint: Folder paths show where files/folders are stored [OK]
Common Mistakes:
Confusing path with file size
Thinking path describes folder color
Assuming path relates to computer speed
2. Which of the following is a correct absolute path on a Windows system?
easy
A. C:\\Users\\Documents\\file.txt
B. /Users/Documents/file.txt
C. Users/Documents/file.txt
D. Documents\\file.txt
Solution
Step 1: Identify absolute path format on Windows
Windows absolute paths start with a drive letter followed by a colon and backslashes, e.g., C:\
Step 2: Check each option
C:\\Users\\Documents\\file.txt uses drive letter C:, backslashes, and full path, so it's correct.
Final Answer:
C:\Users\Documents\file.txt -> Option A
Quick Check:
Windows absolute path = drive letter + backslashes [OK]
Hint: Windows absolute paths start with drive letter and colon [OK]
Common Mistakes:
Using forward slashes instead of backslashes on Windows
Missing drive letter in absolute path
Confusing relative path with absolute path
3. Given the folder structure:
Root/
FolderA/
File1.txt
FolderB/
File2.txt
If the current folder is Root/FolderA, what file does the relative path ../FolderB/File2.txt point to?
medium
A. Root/FolderA/File1.txt
B. Root/File2.txt
C. Root/FolderA/FolderB/File2.txt
D. Root/FolderB/File2.txt
Solution
Step 1: Understand relative path with '..'
'..' means move up one folder from current folder Root/FolderA to Root.
Step 2: Follow the rest of the path
From Root, go into FolderB, then File2.txt, so full path is Root/FolderB/File2.txt.
Final Answer:
Root/FolderB/File2.txt -> Option D
Quick Check:
Relative path '..' moves up one folder [OK]
Hint: Use '..' to go up one folder in relative paths [OK]
Common Mistakes:
Not moving up folder with '..'
Assuming relative path starts from root
Confusing folder names in path
4. Identify the error in this relative path if the current folder is /home/user/docs: ../../user/docs/file.txt
medium
A. Incorrect folder name 'user' repeated
B. Too many '..' moves up beyond root
C. Path uses forward slashes instead of backslashes
D. Missing drive letter for absolute path
Solution
Step 1: Analyze the relative path steps
Starting at /home/user/docs, '..' moves up to /home/user, second '..' moves up to /home.
Step 2: Check the rest of the path
Then path goes into 'user/docs/file.txt' again, repeating 'user/docs' which is redundant and likely incorrect.
Final Answer:
Incorrect folder name 'user' repeated -> Option A
Quick Check:
Repeated folder names in path indicate error [OK]
Hint: Check if path repeats folders unnecessarily [OK]
Common Mistakes:
Thinking '..' moves beyond root causes error
Confusing slash directions on Unix systems
Expecting drive letters on Unix paths
5. You have a folder structure:
Project/
src/
main.py
data/
input.csv
If your current folder is Project/src, which relative path correctly accesses input.csv?
hard
A. data/input.csv
B. ../data/input.csv
C. /Project/data/input.csv
D. ./data/input.csv
Solution
Step 1: Identify current folder and target file location
Current folder is Project/src; input.csv is in Project/data.
Step 2: Construct relative path
To reach data from src, move up one folder with '..', then into data/input.csv, so path is '../data/input.csv'.
Final Answer:
../data/input.csv -> Option B
Quick Check:
Use '..' to go up, then folder name to go down [OK]
Hint: Use '..' to move up, then folder name to move down [OK]
Common Mistakes:
Using './data/input.csv' which looks inside src/data (doesn't exist)
Using absolute path without root slash
Assuming 'data/input.csv' works from src folder
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.