Complete the code to show the root folder in a file path.
root = "[1]"
The root folder in a file path is represented by a single slash "/". It is the top-level directory.
Complete the code to join folder names into a path using the correct separator.
path = "home" + [1] + "documents"
The forward slash "/" is used as a folder separator in Unix-like systems to join folder names into a path.
Fix the error in the path string by replacing the wrong separator.
path = "C:[1]Users[1]Documents"
Windows paths use backslash \\ as the folder separator. The code needs \\ instead of "/" or ":".
Fill both blanks to create a relative path from 'documents' to 'photos'.
relative_path = "[1]" + [2] + "photos"
".." means go up one folder level, and "/" is the folder separator in relative paths on Unix-like systems.
Fill all three blanks to create an absolute path to 'file.txt' inside 'downloads' folder.
absolute_path = "/[1]" + [2] + "downloads" + [3] + "file.txt"
The absolute path starts from root "/", then "home" folder, then separator "/", then "downloads", separator "/", and finally the file name.