Wednesday , November 18 2026
Breaking News

Google IT Automation with Python Certification Exam Answers 2026 (All 100 Questions)

Google IT Automation with Python Certification exam answers 2026: This page lists all 100 questions of the official Google IT Automation with Python Certification exam by Itronix Solutions, each with its four answer options and the correct answer highlighted in green. Use it to revise every topic before you attempt the test and earn your verifiable certificate.

About this certification: It’s designed to teach you how to program with Python and how to use Python to automate common system administration tasks.

Certification Google IT Automation with Python Certification
Provider Itronix Solutions
Category Programming & Development
Total questions 100 multiple-choice questions
Marks 1 mark per question (100 marks)
Passing score 80% (80 out of 100)
Retake Available if you do not pass
Certificate Verifiable online certificate

Take the exam: Google IT Automation with Python Certification on Itronix Solutions. See every other Itronix exam in our complete list of Itronix certification answers.

Google IT Automation with Python Exam Questions and Answers

Questions 1 to 25

1. What is the maximum length of a Python identifier?

A. No fixed length is specified. ✔
B. 128
C. 16
D. 32

Correct answer: A. No fixed length is specified.

2. How is a code block indicated in Python?

A. Brackets.
B. Indentation. ✔
C. Key.
D. None of the above.

Correct answer: B. Indentation.

3. Which of the following concepts is not a part of Python?

A. Loops.
B. Dynamic Typing.
C. Pointers. ✔
D. All of the above.

Correct answer: C. Pointers.

4. Which of the following statements are used in Exception Handling in Python?

A. try
B. except
C. finally
D. All of the above ✔

Correct answer: D. All of the above

5. Which of the following types of loops are not supported in Python?

A. for
B. while
C. do-while ✔
D. None of the above

Correct answer: C. do-while

6. Which of the following is the proper syntax to check if a particular element is present in a list?

A. if not ele not in list
B. if ele in list
C. Both A and B ✔
D. None of the above

Correct answer: C. Both A and B

7. Which of the following functions converts date to corresponding time in Python?

A. strftime()
B. strptime() ✔
C. Both A and B
D. None of the above

Correct answer: B. strptime()

8. As what datatype are the *args stored, when passed into a function?

A. Tuple. ✔
B. List.
C. Dictionary.
D. None of the above.

Correct answer: A. Tuple.

9. What is the maximum possible length of an identifier?

A. 32
B. 16
C. 64
D. None of these above ✔

Correct answer: D. None of these above

10. Who developed the Python language?

A. Zim Den
B. Guido van Rossum ✔
C. Niene Stom
D. Wick van Rossum

Correct answer: B. Guido van Rossum

11. In which language is Python written?

A. PHP
B. C ✔
C. English
D. All of the above

Correct answer: B. C

12. What do we use to define a block of code in Python language?

A. Brackets
B. Indentation ✔
C. Key
D. None of these

Correct answer: B. Indentation

13. Which of the following statements is correct regarding the object-oriented programming concept in Python?

A. Objects are real-world entities while classes are not real ✔
B. Classes are real-world entities while objects are not real
C. Both objects and classes are real-world entities
D. All of the above

Correct answer: A. Objects are real-world entities while classes are not real

14. What is the method inside the class in python language?

A. Object
B. Function ✔
C. Argument
D. Attribute

Correct answer: B. Function

15. Is Python code compiled or interpreted?

A. Python code is both compiled and interpreted ✔
B. Python code is neither compiled nor interpreted
C. Python code is only compiled
D. Python code is only interpreted

Correct answer: A. Python code is both compiled and interpreted

16. Which of the following functions can help us to find the version of python that we are currently working on?

A. sys.version(0)
B. sys.version(1)
C. sys.version ✔
D. sys.version()

Correct answer: C. sys.version

17. What is the order of precedence in python?

A. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction ✔
B. Parentheses, Exponential, Multiplication, Division, Subtraction, Addition
C. Exponential, Parentheses, Division, Multiplication, Addition, Subtraction
D. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

Correct answer: A. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

18. Which of the following is true for variable names in Python?

A. underscore and ampersand are the only two special characters allowed
B. unlimited length ✔
C. all private members must have leading and trailing underscores
D. none of the mentioned

Correct answer: B. unlimited length

19. Which of the following is the truncation division operator in Python?

A. /
B. %
C. |
D. // ✔

Correct answer: D. //

20. Which of the following functions is a built-in function in python?

A. print() ✔
B. seed()
C. sqrt()
D. factorial()

Correct answer: A. print()

21. IT automation with Python helps to:

A. Create graphics
B. Replace all IT staff
C. Perform repetitive system tasks reliably with scripts ✔
D. Design hardware

Correct answer: C. Perform repetitive system tasks reliably with scripts

22. A Python script is run from the terminal with:

A. python3 script.py ✔
B. start python
C. exec script.txt
D. run script

Correct answer: A. python3 script.py

23. The shebang line #!/usr/bin/env python3 allows:

A. Defining functions
B. Running a script directly as an executable on Unix ✔
C. Importing modules
D. Commenting code

Correct answer: B. Running a script directly as an executable on Unix

24. chmod +x script.py is used to:

A. Compile a script
B. Make a script executable ✔
C. Delete a script
D. Rename a script

Correct answer: B. Make a script executable

25. The os module provides:

A. Databases
B. Functions to interact with the operating system ✔
C. Only maths functions
D. Web servers

Correct answer: B. Functions to interact with the operating system

Questions 26 to 50

26. os.path.exists(path) checks:

A. Whether a file or directory exists ✔
B. File owner
C. File size
D. File content

Correct answer: A. Whether a file or directory exists

27. os.listdir(path) returns:

A. The current time
B. A list of entries in a directory ✔
C. Disk usage
D. Running processes

Correct answer: B. A list of entries in a directory

28. os.path.join() is used to:

A. Join strings for printing
B. Merge files
C. Build file paths correctly for the operating system ✔
D. Join lists

Correct answer: C. Build file paths correctly for the operating system

29. os.makedirs() creates:

A. Processes
B. Files only
C. Users
D. Directories, including intermediate ones ✔

Correct answer: D. Directories, including intermediate ones

30. os.environ provides access to:

A. Registry only
B. Network sockets
C. Environment variables ✔
D. File contents

Correct answer: C. Environment variables

31. The shutil module is used to:

A. Send emails
B. Parse JSON
C. Copy, move and remove files and directories at a high level ✔
D. Draw charts

Correct answer: C. Copy, move and remove files and directories at a high level

32. shutil.disk_usage() returns:

A. Memory usage
B. CPU usage
C. Network speed
D. Total, used and free disk space ✔

Correct answer: D. Total, used and free disk space

33. The psutil library can report:

A. Only dates
B. CPU, memory and process information ✔
C. Only emails
D. Only file names

Correct answer: B. CPU, memory and process information

34. Opening files with "with open(…) as f:" ensures:

A. The file is copied
B. The file is deleted
C. The file is encrypted
D. The file is closed automatically ✔

Correct answer: D. The file is closed automatically

35. Mode "w" when opening a file:

A. Reads only
B. Writes and overwrites existing content ✔
C. Appends content
D. Creates a directory

Correct answer: B. Writes and overwrites existing content

36. Mode "a" when opening a file:

A. Deletes the file
B. Reads only
C. Overwrites the file
D. Appends to the end of the file ✔

Correct answer: D. Appends to the end of the file

37. The csv module is used to:

A. Compress files
B. Send HTTP requests
C. Parse HTML
D. Read and write comma-separated value files ✔

Correct answer: D. Read and write comma-separated value files

38. csv.DictReader returns rows as:

A. Tuples only
B. Strings
C. Lists only
D. Dictionaries keyed by header names ✔

Correct answer: D. Dictionaries keyed by header names

39. The json module’s json.load() reads:

A. Images
B. JSON data from a file into Python objects ✔
C. CSV files
D. Binary only

Correct answer: B. JSON data from a file into Python objects

40. The re module is used for:

A. Random numbers
B. Recursion
C. Regular expressions ✔
D. Remote access

Correct answer: C. Regular expressions

41. In regex, \d matches:

A. Any character
B. A letter
C. A digit ✔
D. Whitespace

Correct answer: C. A digit

42. In regex, \w matches:

A. A word character (letter, digit or underscore) ✔
B. Whitespace
C. A digit only
D. A newline

Correct answer: A. A word character (letter, digit or underscore)

43. In regex, a dot (.) matches:

A. Only digits
B. Only letters
C. Only a full stop
D. Any single character except newline ✔

Correct answer: D. Any single character except newline

44. In regex, * means:

A. Exactly one
B. None
C. One or more
D. Zero or more of the preceding element ✔

Correct answer: D. Zero or more of the preceding element

45. In regex, + means:

A. Zero or more
B. Exactly zero
C. Optional
D. One or more of the preceding element ✔

Correct answer: D. One or more of the preceding element

46. In regex, ^ anchors to:

A. The start of a string ✔
B. A digit
C. The end of a string
D. A space

Correct answer: A. The start of a string

47. In regex, $ anchors to:

A. A digit
B. The end of a string ✔
C. A dollar sign only
D. The start of a string

Correct answer: B. The end of a string

48. re.search() returns:

A. A list of strings only
B. A count
C. The first match object or None ✔
D. All matches always

Correct answer: C. The first match object or None

49. re.findall() returns:

A. Only the first match
B. A boolean
C. A count
D. A list of all matches ✔

Correct answer: D. A list of all matches

50. Capturing groups in regex are created with:

A. Square brackets [ ]
B. Curly braces { }
C. Parentheses ( ) ✔
D. Angle brackets < >

Correct answer: C. Parentheses ( )

Questions 51 to 75

51. re.sub() is used to:

A. Replace text matching a pattern ✔
B. Count lines
C. Open files
D. Split files

Correct answer: A. Replace text matching a pattern

52. The subprocess module is used to:

A. Run external commands and programs ✔
B. Create classes
C. Parse JSON
D. Draw charts

Correct answer: A. Run external commands and programs

53. subprocess.run(["ls","-l"]) executes:

A. A SQL query
B. A Python function
C. The ls -l command ✔
D. A web request

Correct answer: C. The ls -l command

54. capture_output=True in subprocess.run():

A. Captures stdout and stderr ✔
B. Runs in background
C. Hides the command
D. Deletes output

Correct answer: A. Captures stdout and stderr

55. A process return code of 0 usually means:

A. Timeout
B. Success ✔
C. Failure
D. Unknown

Correct answer: B. Success

56. sys.argv contains:

A. Command-line arguments passed to the script ✔
B. Installed packages
C. Environment variables
D. System time

Correct answer: A. Command-line arguments passed to the script

57. sys.exit(1) is used to:

A. Restart Python
B. Exit the script with a non-zero (error) status ✔
C. Import modules
D. Print output

Correct answer: B. Exit the script with a non-zero (error) status

58. Standard input, output and error are called:

A. in, out, err files only
B. console1, 2, 3
C. read, write, fail
D. stdin, stdout and stderr ✔

Correct answer: D. stdin, stdout and stderr

59. Redirecting output in Bash with > sends it to:

A. A file, overwriting it ✔
B. Another user
C. The printer
D. The screen only

Correct answer: A. A file, overwriting it

60. A pipe (vertical bar) in Bash:

A. Runs as root
B. Creates files
C. Comments code
D. Passes one command’s output as another’s input ✔

Correct answer: D. Passes one command’s output as another’s input

61. grep in Linux is used to:

A. Copy files
B. Kill processes
C. Search text for patterns ✔
D. Change permissions

Correct answer: C. Search text for patterns

62. Bash variables are referenced with:

A. @VAR
B. $VAR ✔
C. &VAR
D. %VAR%

Correct answer: B. $VAR

63. A Bash for loop over files can be written as:

A. f in files -> do
B. loop f in files
C. for f in *.log; do …; done ✔
D. foreach (f)

Correct answer: C. for f in *.log; do …; done

64. Python’s requests library is used for:

A. Reading CSV
B. Regex matching
C. Disk operations
D. Making HTTP requests ✔

Correct answer: D. Making HTTP requests

65. requests.get(url).status_code returns:

A. The page HTML
B. The HTTP response status code ✔
C. The URL
D. The headers only

Correct answer: B. The HTTP response status code

66. HTTP status 200 means:

A. Forbidden
B. Success ✔
C. Not found
D. Server error

Correct answer: B. Success

67. The smtplib and email modules help to:

A. Draw images
B. Run SQL
C. Compose and send emails from Python ✔
D. Parse CSV

Correct answer: C. Compose and send emails from Python

68. The Pillow (PIL) library is used to:

A. Run commands
B. Parse logs
C. Send emails
D. Process and convert images ✔

Correct answer: D. Process and convert images

69. Unit tests verify:

A. Only the UI
B. Small pieces of code behave as expected ✔
C. The whole network
D. Server hardware

Correct answer: B. Small pieces of code behave as expected

70. The unittest module uses assertions such as:

A. checkEqual
B. mustEqual
C. ensureSame
D. assertEqual ✔

Correct answer: D. assertEqual

71. pytest is:

A. A package manager
B. A debugger only
C. A linter only
D. A popular Python testing framework ✔

Correct answer: D. A popular Python testing framework

72. Test-driven development means:

A. Writing tests before the code that makes them pass ✔
B. Testing manually
C. Never testing
D. Testing after release only

Correct answer: A. Writing tests before the code that makes them pass

73. Edge cases are:

A. Imports
B. Comments
C. Normal inputs only
D. Unusual or boundary inputs that may break code ✔

Correct answer: D. Unusual or boundary inputs that may break code

74. try/except blocks are used to:

A. Handle errors gracefully ✔
B. Import modules
C. Create loops
D. Define classes

Correct answer: A. Handle errors gracefully

75. raise ValueError("msg") is used to:

A. Signal an error condition explicitly ✔
B. Print a message
C. Create a variable
D. Exit Python

Correct answer: A. Signal an error condition explicitly

Questions 76 to 100

76. assert statements are used to:

A. Create files
B. Check conditions that must be true during development ✔
C. Send emails
D. Import modules

Correct answer: B. Check conditions that must be true during development

77. Git is used in IT automation to:

A. Deploy servers only
B. Version control scripts and collaborate ✔
C. Compress files
D. Run scripts

Correct answer: B. Version control scripts and collaborate

78. git diff shows:

A. Branch names
B. Changes between versions ✔
C. Commit messages only
D. Remote URLs

Correct answer: B. Changes between versions

79. git commit records:

A. A deletion only
B. A snapshot of staged changes ✔
C. A remote push
D. A new branch

Correct answer: B. A snapshot of staged changes

80. Debugging tools like pdb allow:

A. Deploying apps
B. Compiling code
C. Encrypting files
D. Stepping through code to find problems ✔

Correct answer: D. Stepping through code to find problems

81. The logging module is better than print in production because it:

A. Does nothing
B. Records levels, timestamps and destinations ✔
C. Formats strings only
D. Only speeds code

Correct answer: B. Records levels, timestamps and destinations

82. Profiling with cProfile helps to:

A. Find slow parts of code ✔
B. Encrypt code
C. Translate code
D. Compress code

Correct answer: A. Find slow parts of code

83. Configuration management tools such as Puppet or Ansible:

A. Store passwords publicly
B. Automate configuring many machines consistently ✔
C. Edit photos
D. Replace Python

Correct answer: B. Automate configuring many machines consistently

84. Infrastructure as code means:

A. Writing documentation only
B. Buying servers manually
C. Defining infrastructure in version-controlled files ✔
D. Drawing diagrams

Correct answer: C. Defining infrastructure in version-controlled files

85. Cloud automation can use:

A. Only phone calls
B. Only manual clicks
C. Only paper forms
D. APIs and SDKs to provision resources programmatically ✔

Correct answer: D. APIs and SDKs to provision resources programmatically

86. Virtual environments (venv) isolate:

A. User accounts
B. Network traffic
C. Project-specific Python packages ✔
D. Operating systems

Correct answer: C. Project-specific Python packages

87. pip install package installs:

A. A browser
B. A Python package from PyPI ✔
C. A database
D. An OS update

Correct answer: B. A Python package from PyPI

88. requirements.txt lists:

A. Python package dependencies for a project ✔
B. Test results
C. Logs
D. Passwords

Correct answer: A. Python package dependencies for a project

89. Scheduling scripts on Linux is often done with:

A. cron ✔
B. Task bars
C. Paint
D. Notepad

Correct answer: A. cron

90. A cron expression "0 2 * * *" runs a job:

A. Every two minutes
B. Every day at 02:00 ✔
C. Every two hours
D. Twice a day

Correct answer: B. Every day at 02:00

91. Parsing log files with Python often involves:

A. Sending SMS
B. Reading lines, applying regex and aggregating counts ✔
C. Building GUIs
D. Editing images

Correct answer: B. Reading lines, applying regex and aggregating counts

92. Idempotent scripts can be run:

A. Only once
B. Multiple times with the same result ✔
C. Only on Windows
D. Never

Correct answer: B. Multiple times with the same result

93. Automation needs error handling and logging because:

A. Errors never happen
B. It is optional
C. Logs slow everything
D. Unattended scripts must fail safely and be diagnosable ✔

Correct answer: D. Unattended scripts must fail safely and be diagnosable

94. Secrets in automation scripts should be:

A. Hard-coded in scripts
B. Committed to Git
C. Stored in environment variables or secret managers ✔
D. Printed to logs

Correct answer: C. Stored in environment variables or secret managers

95. The main benefit of IT automation is:

A. Avoiding documentation
B. Eliminating all jobs
C. Saving time and reducing human error in repetitive tasks ✔
D. Making systems slower

Correct answer: C. Saving time and reducing human error in repetitive tasks

96. Memory leaks in long-running scripts can be investigated with:

A. Memory profiling tools ✔
B. Restarting monitors
C. Ignoring them
D. Changing fonts

Correct answer: A. Memory profiling tools

97. glob.glob("*.txt") returns:

A. A list of file paths matching the pattern ✔
B. A count
C. File contents
D. A directory tree only

Correct answer: A. A list of file paths matching the pattern

98. datetime.datetime.now() returns:

A. A timestamp string only
B. The current local date and time ✔
C. A fixed date
D. Tomorrow’s date

Correct answer: B. The current local date and time

99. f-strings such as f"Hello {name}" are used to:

A. Import modules
B. Embed expressions inside string literals ✔
C. Create files
D. Run commands

Correct answer: B. Embed expressions inside string literals

100. A dictionary comprehension like {k: v for k, v in pairs} creates:

A. A string
B. A dictionary from an iterable ✔
C. A set
D. A list

Correct answer: B. A dictionary from an iterable

How to Pass the Google IT Automation with Python Exam

  • Read every question carefully; most options look similar, so look for the most precise answer.
  • Revise the questions above topic by topic rather than memorising letters, because option order can change in the live test.
  • You need 80 correct answers out of 100 to pass, so aim to understand at least 85 to stay safe.
  • If you do not clear it on the first attempt, review the questions you missed and use the retake option.

Frequently Asked Questions

How many questions are in the Google IT Automation with Python Certification exam?

The exam has 100 multiple-choice questions, each worth 1 mark.

What is the passing score for the Google IT Automation with Python Certification?

You need at least 80% (80 out of 100) to pass and receive the certificate.

Can I retake the Google IT Automation with Python Certification exam?

Yes. If you score below 80%, you can retry the test after reviewing the topics.

Is the Itronix certificate verifiable?

Yes. Every certificate issued by Itronix Solutions has a unique ID that can be checked on the Itronix verify-certificate page.

More Programming & Development Certification Answers

Disclaimer: These answers are provided for learning and revision. Questions and answers are checked regularly; if you find a mistake, let us know in the comments.

About Priya Dogra

Priya Dogra runs priyadogra.com, where she shares free certification courses, internships, jobs, scholarships and exam preparation guides for Indian students and freshers. Follow her on YouTube, LinkedIn and Instagram for the latest opportunities.

Check Also

Unix/ Linux Certification exam answers 2026

Unix/ Linux Certification Exam Answers 2026 (All 100 Questions)

All 100 Unix/ Linux Certification exam questions with correct answers highlighted - updated 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *