exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 272 discussion

Actual exam question from CompTIA's PT0-002
Question #: 272
Topic #: 1
[All PT0-002 Questions]

Given the following script:



Which of the following describes True?

  • A. A while loop
  • B. A conditional
  • C. A Boolean operator
  • D. An arithmetic operator
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
DRVision
Highly Voted 1 year, 5 months ago
Selected Answer: C
describe true, not the loop
upvoted 6 times
PhillyCheese
10 months, 2 weeks ago
while True means loop forever. The while statement takes an expression and executes the loop body while the expression evaluates to (boolean) "true". True always evaluates to boolean "true" and thus executes the loop body indefinitely.
upvoted 1 times
...
...
FasterN8
Highly Voted 9 months, 1 week ago
Selected Answer: B
'True' is a boolean value, can't be a Boolean Operator, those are well defined as (AND, OR, XOR, etc.). In this case, "True" is also the entirety of the conditional expression that is expected by the while loop. As it so happens, this expression always returns the same value (True).
upvoted 5 times
...
study_study
Most Recent 3 weeks, 1 day ago
Selected Answer: B
True is a Boolean value, not a Boolean operator. Therefore, B, a conditional is correct.
upvoted 1 times
...
BlackSkullz
4 months, 2 weeks ago
Selected Answer: B
Yes, True is a boolean operator and yes, it is being used within a while loop. However, it is specifically being used as a condition within the while loop to execute the print command is it is met
upvoted 1 times
BlackSkullz
4 months, 2 weeks ago
if it is met*
upvoted 1 times
...
...
Nikamy
5 months, 1 week ago
Selected Answer: B
Boolean Operator must have AND, OR, XOR. Do a simple google search. So is a conditional. The condition is while [TRUE] white True is True. True is always True so it is a conditional.
upvoted 1 times
...
fecffa8
5 months, 1 week ago
Selected Answer: B
B. A conditional. Yes, True/False are boolean. It asks which of the following describes "True". A while loop repeats the block of code based on a given Boolean condition. However, in the statement true is the condition. while condition: body of while loop containing code that does something
upvoted 1 times
...
lujaga
5 months, 3 weeks ago
B is the answer. The while in a while loop is always followed by a conditional
upvoted 2 times
...
3d8c4e3
8 months, 3 weeks ago
You can literally Google "while True Python" and it describes this as a while loop...
upvoted 1 times
...
Etc_Shadow28000
9 months, 2 weeks ago
Selected Answer: C
C. A Boolean operator: True is a Boolean value in Python, which is used in the context of the while loop’s condition. Since True always evaluates to True, this creates an infinite loop. A. A while loop: The while keyword indicates the beginning of a while loop, but it does not describe what True is. B. A conditional: While the while loop contains a conditional statement, True itself is not the conditional but rather the value used in the conditional expression. D. An arithmetic operator: Arithmetic operators include symbols like +, -, *, and /, which are used for mathematical operations. True is not an arithmetic operator.
upvoted 1 times
...
Cyber_Soter
12 months ago
Selected Answer: B
While true is a loop, however True is a conditional of that loop. so I think it's B
upvoted 2 times
...
PeteyPete
12 months ago
Selected Answer: B
B is the right answer and I’ve confirmed it with an expert!
upvoted 2 times
...
Big_Dre
1 year, 1 month ago
Selected Answer: A
The keyword True is used as the condition for the while loop.
upvoted 2 times
...
LiveLaughToasterBath
1 year, 2 months ago
Selected Answer: A
The condition in a while loop can be any boolean-valued expression. From hws.edu
upvoted 1 times
LiveLaughToasterBath
1 year, 2 months ago
free code camp: If the condition evaluates to True..... It's a conditional, I change my answer to B.
upvoted 2 times
...
...
[Removed]
1 year, 4 months ago
Selected Answer: C
True and False are boolean operators. A condition would be the entire line "While True:".
upvoted 3 times
...
Alizade
1 year, 5 months ago
Selected Answer: A
The answer is A. A while loop.
upvoted 1 times
ElDirec
1 year, 3 months ago
same as you could describe "while true" as a conditional. True is what we are describing, being a boolean, nothing else. Answer C
upvoted 2 times
...
Nelsito
1 year, 5 months ago
Isn't the "True" keyword itself a boolean operator?
upvoted 2 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