Skip to content

Module 2 challenge: Process Text Files with Python Dictionaries and Upload to Running Web Service :Automating Real-World Tasks with Python (Google IT Automation with Python Professional Certificate) Answers 2025

1. Python dictionaries
✔️ Python dictionaries are ordered (since Python 3.7+)
✔️ Python dictionaries are mutable
❌ Python dictionaries allow duplicate keys
✔️ Python dictionaries are indexed by keys

2. Data format for exchanging data
❌ CSV
❌ HTML
❌ XML
✔️ JSON

3. Primary purpose of a web framework
❌ Design GUI for web apps
✔️ Provide pre-built structure and components for web apps
❌ Secure web servers
❌ Optimize browser loading times

4. Primary purpose of Python requests library
❌ GUI applications
✔️ Handling HTTP requests
❌ Scientific computing
❌ Database interactions

5. Required parameter for os.listdir()
❌ File descriptor
✔️ Path to the directory whose contents you want to list
❌ List of file extensions
❌ No required parameters

6. Constraint of REST architecture
❌ Discourages caching
❌ Allows clients to request specific API versions
❌ Can maintain client sessions (stateful)
✔️ Server does not store client-specific session info (stateless)

7. Primary purpose of HTTP POST
❌ Update existing data only
❌ Retrieve from server cache
❌ Request data from server
✔️ Submit data to create or update a resource

8. Primary purpose of Django
✔️ Developing web applications using Python
❌ Designing database schemas for mobile apps
❌ Building web applications using JavaScript
❌ Creating interactive web interfaces only

9. Common use case for cat command
❌ Compiling modules
❌ Executing code
✔️ Displaying a file’s contents
❌ Creating a new script

10. status_code attribute
❌ Time to complete request
✔️ Success or failure of the response
❌ Size of request payload
❌ Content type of response


📌 Summary Table

Q# Correct Answer(s)
1 Ordered, Mutable, Indexed by keys ✔️
2 JSON ✔️
3 Pre-built structure & components ✔️
4 Handling HTTP requests ✔️
5 Path to directory ✔️
6 Stateless server ✔️
7 Submit data to create/update ✔️
8 Developing web apps in Python ✔️
9 Display file contents ✔️
10 Success/failure of response ✔️