Module 4 challenge: Automate updating catalog information :Automating Real-World Tasks with Python (Google IT Automation with Python Professional Certificate) Answers 2025
1. Purpose of changeImage.py
❌ Generates PDF reports
❌ Uploads images to a web server
✔️ Processes supplier images to change resolution and format
❌ Sends error emails
2. Primary purpose of Python Imaging Library (PIL)
❌ Database library
❌ Machine learning framework
❌ Web development tool
✔️ Library for working with and manipulating images
3. Handling raw images with alpha transparency
❌ Resize to larger resolution
❌ Apply Gaussian blur
❌ Compress images
✔️ Use convert("RGB") to convert RGBA to RGB
4. Specific changes made by changeImage.py
❌ Renames files
✔️ Changes resolution from 3000×2000 → 600×400 and converts .TIFF → .JPEG
❌ Converts JPEG → TIFF
❌ Upscales 600×400 → 3000×2000
5. Purpose of report_email.py
❌ Check system health
❌ Change image formats
❌ Download supplier data
✔️ Process supplier text data and create a PDF report
6. Primary purpose of requests module
✔️ Send HTTP requests and handle responses
❌ Data manipulation in files
❌ GUI creation
❌ Scientific computing
7. What health_check.py monitors
❌ Network connectivity
✔️ System statistics
❌ File permissions
❌ Software updates
8. Purpose of cron job for health_check.py
✔️ Schedule script to run automatically and send alerts
❌ Backup script
❌ Manually trigger script
❌ Execute only once
9. Purpose of a serializer in Django REST framework
❌ Render HTML templates
❌ Authentication/authorization
❌ Define URL routing
✔️ Validate and convert complex data types to Python types
10. Automation workflow for similar tasks
✔️ Use PIL for image processing, ReportLab for PDF, smtplib for email, schedule with cron job
❌ OpenCV, PyPDF2, emails, Task Scheduler
❌ NumPy, Matplotlib, WeasyPrint, custom scheduler
❌ Requests, Matplotlib, smtplib, manually run
📌 Summary Table
| Q# | Correct Answer(s) |
|---|---|
| 1 | Process images ✔️ |
| 2 | PIL for image manipulation ✔️ |
| 3 | Convert RGBA → RGB ✔️ |
| 4 | Resize & convert TIFF→JPEG ✔️ |
| 5 | Generate PDF reports from text ✔️ |
| 6 | Send HTTP requests ✔️ |
| 7 | Monitor system stats ✔️ |
| 8 | Automate via cron ✔️ |
| 9 | Serializer converts/validates data ✔️ |
| 10 | PIL + ReportLab + smtplib + cron ✔️ |