Skip to content
Pass Any WGU OA Exam Now & Pay After You Pass. Contact Us!
  1. Home
  2. WGU Exams
  3. WGU D522
  4. Set 5
WGU D522 · Python for IT Automation

WGU D522 Practice Questions – Set 5

50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.

Question 1 of 50

What is the output of print(2 + 3 * 4)?

Question 2 of 50

What is the output of print(10 // 3)?

Question 3 of 50

What is the output of print(10 % 3)?

Question 4 of 50

What is the output of print(len('automation'))?

Question 5 of 50

What is the output of print('ab' * 3)?

Question 6 of 50

What does 'Hello'[1] return?

Question 7 of 50

What does 'Python'[-1] return?

Question 8 of 50

What is the output of print(bool(0))?

Question 9 of 50

What is the output of print(bool('hello'))?

Question 10 of 50

What does list('abc') produce?

Question 11 of 50

What is the output of print(list(range(2, 5)))?

Question 12 of 50

What does 'a,b,c'.split(',') return?

Question 13 of 50

What does ' '.join(['a', 'b', 'c']) return?

Question 14 of 50

What is the result of 'Hello'.replace('l', 'L')?

Question 15 of 50

What does {1, 2, 2, 3} evaluate to as a set?

Question 16 of 50

What does dict(a=1, b=2) create?

Question 17 of 50

What is the output of print(sum([1, 2, 3, 4]))?

Question 18 of 50

What is the output of print(max([3, 7, 2, 9, 5]))?

Question 19 of 50

What is the output of print(min([3, 7, 2, 9, 5]))?

Question 20 of 50

What is the output of print(sorted([3, 1, 2]))?

Question 21 of 50

What does 'HELLO'.lower() return?

Question 22 of 50

What is the output of print(abs(-7))?

Question 23 of 50

What does round(3.567, 1) return?

Question 24 of 50

What is the output of print(type(5))?

Question 25 of 50

What is the result of int('10') + 5?

Question 26 of 50

What is the result of str(10) + '5'?

Question 27 of 50

What does ' data '.strip() return?

Question 28 of 50

What is the output of print(3 > 2 and 5 > 4)?

Question 29 of 50

What is the output of print(3 > 5 or 2 < 4)?

Question 30 of 50

What is the output of print(not True)?

Question 31 of 50

What does 'automation'.startswith('auto') return?

Question 32 of 50

What does 'report.txt'.endswith('.txt') return?

Question 33 of 50

What is the output of print('abc'.upper())?

Question 34 of 50

What does list(range(0, 10, 2)) produce?

Question 35 of 50

What is the output of print(len([1, [2, 3], 4]))?

Question 36 of 50

What does 'Hello World'.split() return with no argument?

Question 37 of 50

What is the output of print(2 ** 5)?

Question 38 of 50

What does a Python dictionary's get('x', 0) return if 'x' is not a key?

Question 39 of 50

What is the output of print('yes' if 5 > 3 else 'no')?

Question 40 of 50

What does the expression [x*x for x in range(4)] produce?

Question 41 of 50

What is the output of print('a' in 'automation')?

Question 42 of 50

What does the float() function do with '3.14'?

Question 43 of 50

What is the output of print(list(reversed([1, 2, 3])))?

Question 44 of 50

What does 'data.csv'.split('.')[-1] return?

Question 45 of 50

What is the output of print(5 == 5.0)?

Question 46 of 50

What does the count() list method return?

Question 47 of 50

What does 'Hello'.find('l') return?

Question 48 of 50

What is the output of print(int(7.9))?

Question 49 of 50

What does the pop() method do to a list?

Question 50 of 50

What single practice most improves the reliability of a Python automation script?

Set 5 complete

You scored 0%

0 correct out of 0 answered (50 questions in this set).

Struggling with WGU D522?

If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.

Chat Now