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:\'.
Folder hierarchy and paths in Intro to Computing - Draw & Build Visually
Start learning this pattern below
Jump into concepts and practice - no test required
or
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Draw This - beginner
Grading Criteria
Solution
Documents
├── Work
│ ├── Projects
│ └── Reports
└── Personal
└── Photos
Full path to 'Reports': C:\\Documents\\Work\\ReportsThis 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. What does a folder path describe in a computer system?
easy
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 CQuick 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
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 AQuick 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:
If the current folder is
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
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 DQuick 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.txtmedium
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 AQuick 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:
If your current folder is
Project/
src/
main.py
data/
input.csv
If your current folder is
Project/src, which relative path correctly accesses input.csv?hard
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 BQuick 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
