exam questions

Exam Certified Data Engineer Associate All Questions

View all questions & answers for the Certified Data Engineer Associate exam

Exam Certified Data Engineer Associate topic 1 question 153 discussion

Actual exam question from Databricks's Certified Data Engineer Associate
Question #: 153
Topic #: 1
[All Certified Data Engineer Associate Questions]

A data engineer only wants to execute the final block of a Python program if the Python variable day_of_week is equal to 1 and the Python variable review_period is True.

Which of the following control flow statements should the data engineer use to begin this conditionally executed code block?

  • A. if day_of_week = 1 and review_period:
  • B. if day_of_week = 1 and review_period = "True":
  • C. if day_of_week = 1 & review_period: = "True":
  • D. if day_of_week == 1 and review_period:
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
b41de50
1 month, 3 weeks ago
Selected Answer: D
if review_period == 'True' is comparing the actual text 'True' not boolean
upvoted 1 times
...
1919730
1 month, 3 weeks ago
Selected Answer: D
In python, to compare two values, we use ==. Also, because review_period is true, no need to compare it to a value. "if review_period" is enough and "if review_period== 'True'" is wrong because we compare a boolean to a string.
upvoted 1 times
...
Manish_Kum
2 months ago
Selected Answer: D
d is right answer
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago